Re: Why is StringBuilder.toString() returning new String instances for empty strings ?

2013-02-28 Thread Volker Simonis
Probably because the API-Spec (http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html#toString%28%29) says "..A new String object is allocated and initialized to contain the character sequence currently represented by this object..". Regards, Volker On Thu, Feb 28, 2013 at 8:47 AM,

Re: Why is StringBuilder.toString() returning new String instances for empty strings ?

2013-02-28 Thread Remi Forax
On 02/28/2013 09:07 AM, Volker Simonis wrote: Probably because the API-Spec (http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html#toString%28%29) says "..A new String object is allocated and initialized to contain the character sequence currently represented by this object..". R

Request for review: 7190897 (fs) Files.isWritable method returns false when the path is writable (win).

2013-02-28 Thread Alexey Utkin
Hi, Please review the fix. Bug description: http://bugs.sun.com/view_bug.do?bug_id=7190897 https://jbs.oracle.com/bugs/browse/JDK-7190897 The suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-7190897/webrev.00/ Summary: The isolated method for the file security descript

hg: jdk8/tl/jdk: 8006409: ThreadLocalRandom should dropping padding fields from its serialized form

2013-02-28 Thread chris . hegarty
Changeset: 7d272e524768 Author:chegar Date: 2013-02-28 12:39 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7d272e524768 8006409: ThreadLocalRandom should dropping padding fields from its serialized form Reviewed-by: dl, martin, alanb, shade ! src/share/classes/java/util/co

Re: Why is StringBuilder.toString() returning new String instances for empty strings ?

2013-02-28 Thread Jan Ohlsen
Yes, makes sense to avoid the branching in that method. Thanks. On Thu, Feb 28, 2013 at 10:23 AM, Remi Forax wrote: > On 02/28/2013 09:07 AM, Volker Simonis wrote: > >> Probably because the API-Spec >> (http://docs.oracle.com/**javase/7/docs/api/java/lang/** >> StringBuilder.html#toString%**28

Re: Do not let internal JDK zlib symbols leak out of fastdebug libzip.so

2013-02-28 Thread Alan Bateman
On 27/02/2013 23:16, Martin Buchholz wrote: I have another iteration of this change http://cr.openjdk.java.net/~martin/webrevs/openjdk8/hide-zlib/ that adds exciting new exception detail message for the InternalError I was scrat

hg: jdk8/tl/langtools: 3 new changesets

2013-02-28 Thread maurizio . cimadamore
Changeset: 133a0a0c2cbc Author:mcimadamore Date: 2013-02-28 14:00 + URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/133a0a0c2cbc 8008723: Graph Inference: bad graph calculation leads to assertion error Summary: Dependencies are not propagated correctly through merged nodes

Re: Request for review: 7190897 (fs) Files.isWritable method returns false when the path is writable (win).

2013-02-28 Thread Alan Bateman
On 28/02/2013 11:54, Alexey Utkin wrote: : The suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-7190897/webrev.00/ Thanks for sorting this out, this code should have used AccessCheck in the original implementation. A couple of comments: Did you consider having AccessCheckFor

Re: Request for review: 7190897 (fs) Files.isWritable method returns false when the path is writable (win).

2013-02-28 Thread Alexey Utkin
On 28.02.2013 18:31, Alan Bateman wrote: On 28/02/2013 11:54, Alexey Utkin wrote: : The suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-7190897/webrev.00/ Thanks for sorting this out, this code should have used AccessCheck in the original implementation. A couple of comments

Re: Request for review: 7190897 (fs) Files.isWritable method returns false when the path is writable (win).

2013-02-28 Thread Alan Bateman
On 28/02/2013 15:17, Alexey Utkin wrote: That is not single, but 4 additional parameters ( FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS) - that are relatively complicate masks. That parameters have to be changed consistently to avoid the problem (there is the ana

Re: Do not let internal JDK zlib symbols leak out of fastdebug libzip.so

2013-02-28 Thread Martin Buchholz
On Thu, Feb 28, 2013 at 6:03 AM, Alan Bateman wrote: > The update to make/java/zip/Makefile looks good to me, we should have > done it a long time ago. I assume you are pushing ahead on this because you > want to push it to jdk7u-dev (as it's not interesting to jdk8 now because > of the new buil

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-28 Thread David DeHaven
> Here's the latest version of the proposed patch: > > http://cr.openjdk.java.net/~martin/webrevs/openjdk8/JNIEXPORT/ > > that has been tested, but only with gcc 4.6, > but is also written to work with llvm. This looks fine, however since 4.2.1 is still used for some builds we need to filter t

Re: @Supported design issues

2013-02-28 Thread mark . reinhold
2013/2/23 5:10 -0800, joe.da...@oracle.com: > On 2/22/2013 3:04 PM, mark.reinh...@oracle.com wrote: >> ... >> >> - The annotation isn't a simple marker annotation, which is what I >> expected at first glance; it takes a boolean parameter. Does this >> mean that we have to go add "@Supported(false

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-28 Thread David DeHaven
>> Here's the latest version of the proposed patch: >> >> http://cr.openjdk.java.net/~martin/webrevs/openjdk8/JNIEXPORT/ >> >> that has been tested, but only with gcc 4.6, >> but is also written to work with llvm. > > This looks fine, however since 4.2.1 I meant 4.1.2… -DrD-

@Supported design issues

2013-02-28 Thread Paul Benedict
Regarding if 2 or more levels are necessary, it can easily be solved by introducing a family of annotations. I suggest abandoning the boolean attribute in favor of (something like) @Supported, @NotSupported, @Experimental, etc. You may likely find the need to express individual attributes at each "

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-28 Thread Daniel D. Daugherty
On 2/28/13 11:57 AM, David DeHaven wrote: Has a bug been filed for this? -DrD- As mentioned earlier in this thread... Dan On 2/19/13 5:21 PM, Daniel D. Daugherty wrote: I couldn't find a 'jdk' repo relevant bug for this issue so I filed: 8008509: 6588413 changed JNIEXPORT visibility f

Review: 7032154 - Performance tuning of sun.misc.FloatingDecimal/FormattedFloatingDecimal

2013-02-28 Thread Brian Burkhalter
Hello, This concerns the issue http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7032154. The patch described in the issue has been updated to be with respect to the current JDK repository tip. The updated version is attached to this message. This is a large patch so it would be great to have

Fwd: Review: 7032154 - Performance tuning of sun.misc.FloatingDecimal/FormattedFloatingDecimal

2013-02-28 Thread Brian Burkhalter
I forgot that the attachment is not redistributed and that I can now post on cr.openjdk.java.net so here's the webrev: http://cr.openjdk.java.net/~bpb/7032154/ Begin forwarded message: > This concerns the issue > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7032154. > > The patch descri