directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: Java 5 compile error (AbstractStringBuilder is not visible)
Date Wed, 01 Dec 2004 13:09:34 GMT
Mark Swanson wrote:

>Hello,
>
>This code fails:
>        StringBuffer buf = new StringBuffer();
>        buf.append( "base: " ).append( base ).append( "\n" );
>
>The problem is that .append(String).append(String)... does not work.
>The workaround that must be done is to change the above code to look like 
>this:
>buf.append("base:");
>buf.append(base);
>buf.append("\n");
>
>This will work on Jdk 1.4, and jdk 1.5.
>
>Cheers.
>
>BTW, I would submit a patch for both of these fixes, but I do not know how to 
>do this as I am a subversion newbie. If someone knows what I should type I 
>would be happy to do it.
>  
>

That's strange.  I haven't had any problems with the 
StringBuffer/StringBuilder
stuff compiling in Java 1.5.

FWIW, I think it would be worth it to specify in the project.properties 
file for all directory
projects that the source code should be 1.3 or 1.4.  That will also 
avoid issues where we have
code using the keyword "enum".

-- 

"Programming today is a race between software engineers striving to build bigger and better
idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far,
the Universe is winning."
                - Rich Cook


Mime
View raw message