StringBuilder.length() does not work with Adobe CF and JDK 1.6.X
I have been doing some string buffer testing and wanted to take advantage of using the new class StringBuilder that was implemented in jdk 1.5. I am running cf8 with jdk 1.5 and 1.6 and decided to do some tests with it. I found out that calling buffer.length() on a cf instance running on jdk 1.6 would fail but a call to the same length method on jdk 1.5 does not. Go Figure!!
Would this be a bug on the Adobe cf java proxy? It seems to me, because the same tests on Railowork (even faster to say the least)!!
To reproduce this error, just try this below:
The string is #myBuffer.toString()#
The length is #myBuffer.length()#
The error that Adobe CF produces is that the method length() does not exist. The only workaround for this is by lengthing the string produced, but it will definitely be slower than a direct length call:
Length: #myBuffer.toString().length()#