Tag Archives: Java

Java Return from Finally

try…catch…finally is the common idiom in Java for exception handling and cleanup. The thing that people may not know is that returning from within a finally block has the unintended consequence of stoping an exception from propagating up the call … Continue reading

Posted in Java | Tagged , , | 2 Comments

MongoDB and Java: Find an item by Id

MongoDB is one of a number of new databases that have cropped up lately eschewing SQL. These NoSQL databases provide non-relational models that are suitable for solving different kinds of problems. This camp includes document oriented, tabular and key/value oriented … Continue reading

Posted in Code, Java | Tagged , , | 2 Comments

Struts2 Map Form to Collection of Objects

The Struts2 documentation contains examples that are often basic at best which can make it challenging to figure out how to do things sometimes. I was working on creating a form that would allow me to select values from a … Continue reading

Posted in Code, Java | Tagged , , , , | 7 Comments

StringBuilder and my Biggest Pet Peeve

What You Should Know About Strings In both Java and .NET (and other languages) String objects are immutable. They don’t change. Period. If you “change” a String, it creates a new String. That includes String concatenation using a + // … Continue reading

Posted in Code | Tagged , | 5 Comments