This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: MAXPATHLEN usage - PR21821


Bryce McKinlay wrote:
David Daney wrote:

Bryce McKinlay wrote:

+ ::java::lang::StringBuffer *msg = new ::java::lang::StringBuffer (path);
+ msg->append (JvNewStringUTF (" ("));
+ msg->append (JvNewStringUTF (strerror (errno)));
+ msg->append (JvNewStringUTF (")"));
+ throw new ::java::io::FileNotFoundException (msg->toString ());



Shouldn't we now be using StringBuilder instead of StringBuffer in places like this?



Yeah, good point. It would be worth doing a pass over the entire library and substituting StringBuffer->StringBuilder everywhere.


I just created a bug to track this issue:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21869

Maybe one day I will have some spare time...


David Daney



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]