In my career as a Java developer, I have seen many different issues/problems. Here a strange problem, one might run into because of the way Java compiler optimizes. This blogger had problems because he is using an older version of Java and mixing of versions.
As a full time Java developer, I don’t encourage using older Java versions (we are about to see Java 9 soon), but if you are stuck some old maintenance projects like this blog, then you may run into this as well.
Recently one of my co-workers had an issue with a website written in JSP. Every time he went to a page, a Servlet Filter was failing with an error that the Java class “StringBuilder” was not found. I’ve added this Servlet Filter in the application recently and this worked fine on other machines and in our Test Servers, but failed on this one machine. Also, we use Java 1.4 and there is no way we could be using Stringbuilder which was only introduced in Java 1.5. (Java 1.4 has only StringBuffer. See here for a discussion on the two).
(I know we are using older technology – we use Sybase EA Server 5.5, which forces us to stick with Java 1.4, but go with me on this.)
Java Strings and Java Compiler
I set to find our why it was complaining about something we don’t use. I looked…
View original post 291 more words