Java 1.5 and String operators

Java 1.5 changed the implementation of StringBuffer and introduced a new StringBuilder (actually both inherit from AbstractStringBuilder). It looks + operator can be either compiled to use StringBuffer (slower, but synchronized) or StringBuilder (faster, thread unsafe). This sucks, as our implementation of Context Sensitive String operations relies on the predictible behaviour + (uses String and StringBuffer).

Well, we’ll end up with having two aspects - one for <1.5 and >=1.5. This sucks….

Leave a Reply