Archive for June, 2005



It was a late evening when I fall in buggy a code like this: Destination newDestination = null; if (! originalDestination.getId().equals(getDestinationId())); { newDestination = context.loadDestination(getDestinationId()); prefix.setDestination(newDestination); } context.save(prefix); if (newDestination != null) { newDestination.addPrefix(prefix); originalDestination.removePrefix(prefix); context.save(originalDestination); context.save(newDestination); } When the first if block is true, the second one will also be true, because the line [...]

That building Strings using StringBuffer (and in Java 5 StringBuilder) is much faster and less memory expensive than using String concatenation, is not a secret. But porting this concept to extremes, you can fall in coding conventions that mandate to never use String concatenation. And you can face hibernate queries like this: 1String alias = [...]




About

You are currently browsing the NewInstance weblog archives for June, 2005.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Calendar

June 2005
M T W T F S S
    Jul »
 12345
6789101112
13141516171819
20212223242526
27282930  

Follow me

twitter flickr LinkedIn feed

Enter your email address:

Archives


Categories

Tag Cloud