RE: shared "value" in java.lang.StringBuilder

2013-11-11 Thread Jeroen Frijters
John Rose wrote: > I think the next interesting version of String will mix header and body > together in a hybrid layout, with private char (or byte) elements and a > few instance variables at the beginning of the layout. It would be good to prepare for this by modifying the JNI spec to explicitly

hg: jdk8/tl/jdk: 8027823: catchException combinator fails with 9 argument target

2013-11-11 Thread john . r . rose
Changeset: 9fcb07df1c92 Author:vlivanov Date: 2013-11-09 04:21 +0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9fcb07df1c92 8027823: catchException combinator fails with 9 argument target Reviewed-by: jrose ! src/share/classes/java/lang/invoke/MethodHandleImpl.java + test/jav

Re: shared "value" in java.lang.StringBuilder

2013-11-11 Thread John Rose
On Nov 11, 2013, at 2:14 PM, Brian Goetz wrote: > I believe a long time ago it used to work this way; there was a private > "handoff" constructor in String that StringBuffer would use. Probably got > changed when we added StringBuilder? As you might expect, we've been exploring this territor

Re: javac: optimized for-each over RandomAccess List

2013-11-11 Thread Vitaly Davidovich
You'd lose the concurrent mod checking that the iterator may do, which would change behavior. Vitaly Sent from my phone On Nov 11, 2013 1:12 PM, "Robert Stupp" wrote: > Hi, > > is it ok to optimize for-each-loop code generation for instances of > java.util.List that also implement java.util.Ran

hg: jdk8/tl/jdk: 8027803: test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java fails

2013-11-11 Thread robert . field
Changeset: c04e46dbfea8 Author:rfield Date: 2013-11-11 16:14 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c04e46dbfea8 8027803: test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java fails Summary: fix NPE in test infrastructure Reviewed-by: ksrini, jfranck, al

hg: jdk8/tl/jdk: 8026330: java.util.Base64 urlEncoder should omit padding

2013-11-11 Thread xueming . shen
Changeset: 8e8e423fa3dc Author:sherman Date: 2013-11-11 14:35 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8e8e423fa3dc 8026330: java.util.Base64 urlEncoder should omit padding Summary: to add Encoder.withoutPadding() Reviewed-by: alanb ! src/share/classes/java/util/Base64

Re: shared "value" in java.lang.StringBuilder

2013-11-11 Thread Brian Goetz
I believe a long time ago it used to work this way; there was a private "handoff" constructor in String that StringBuffer would use. Probably got changed when we added StringBuilder? On Nov 6, 2013, at 10:54 PM, Robert Stupp wrote: > Hi, > > I was wondering why the mostly allocated class in

Re: Signature of MethodHandleInfo.reflectAs is not specific enough

2013-11-11 Thread Ali Ebrahimi
Hi, I know this is not fully type safe, in fact java generics is not fully type safe. We don't have any better solution with current language support. if we had: or we had better solutions: public T reflectAs(Class expected, Lookup lookup) public R reflectAs(Class expected, Lookup lookup) but

hg: jdk8/tl/jdk: 8014506: Test of Jdp feature

2013-11-11 Thread staffan . larsen
Changeset: 0cacac7f5c37 Author:sla Date: 2013-11-08 18:16 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0cacac7f5c37 8014506: Test of Jdp feature Reviewed-by: sla Contributed-by: Alex Schenkman + test/sun/management/jdp/ClientConnection.java + test/sun/management/jdp/Dynam

Re: Please help - OSX 10.9 build fails

2013-11-11 Thread Alan Bateman
On 06/11/2013 21:14, Robert Stupp wrote: Hi, I'm trying to build openjdk8 on OSX 10.9 but it fails. This may be something to bring up on the build-dev list, I think there was a bit of discussion recently on this list about Xcode 5 and clang. -Alan.

Re: RFR: patch to reduce use of many temporary objects in java.util.UUID

2013-11-11 Thread Alan Bateman
On 07/11/2013 00:19, Robert Stupp wrote: Hi, the current implementation of java.util.UUID.fromName() and java.util.UUID.toString() unnecessarily produce a lot of temporary objects. Especially the fromName() method creates some instances of java.lang.Long and indirectly via "name.split()" many

Re: shared "value" in java.lang.StringBuilder

2013-11-11 Thread Alan Bateman
On 06/11/2013 21:54, Robert Stupp wrote: Hi, I was wondering why the mostly allocated class in nearly all applications is char[]. A deeper inspection showed that a lot of these char[] allocations are "caused" by the code from java.lang.StringBuilder.toString(), which created a copy of its inte

Re: RFR: patch to reduce use of many temporary objects in java.util.UUID

2013-11-11 Thread Steven Schlansker
On Nov 11, 2013, at 10:55 AM, Andreas Rieber wrote: > On 11.11.2013 19:39, Steven Schlansker wrote: >> Sorry I don’t have the best list message references here, Oracle seems to >> have decided to break all the links through the old Sun bug database, so all >> my references are gone. Bummer. :

hg: jdk8/tl/jdk: 8028149: Clean-up javac -Xlint warnings in com.sun.rowset and com.sun.rowset.internal

2013-11-11 Thread lance . andersen
Changeset: 59ff7957c26f Author:lancea Date: 2013-11-11 14:22 -0500 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/59ff7957c26f 8028149: Clean-up javac -Xlint warnings in com.sun.rowset and com.sun.rowset.internal Reviewed-by: darcy ! src/share/classes/com/sun/rowset/CachedRowSetI

Re: Request for review: 8028149, clean up javac -Xlint errors com.sun.rowset.*

2013-11-11 Thread Joe Darcy
Hi Lance, Approved! Thanks, -Joe On 11/11/2013 11:01 AM, Lance Andersen wrote: Hi, Need a reviewer to close down these two lint warning in com.sun.rowset.* $ serialver com.sun.rowset.internal.BaseRow com.sun.rowset.internal.BaseRow:static final long serialVersionUID = 41520135235114122

Request for review: 8028149, clean up javac -Xlint errors com.sun.rowset.*

2013-11-11 Thread Lance Andersen
Hi, Need a reviewer to close down these two lint warning in com.sun.rowset.* $ serialver com.sun.rowset.internal.BaseRow com.sun.rowset.internal.BaseRow:static final long serialVersionUID = 4152013523511412238L; $ hg status -ma M src/share/classes/com/sun/rowset/CachedRowSetImpl.java M src/

Re: shared "value" in java.lang.StringBuilder

2013-11-11 Thread Tom Hawtin
On 06/11/2013 21:54, Robert Stupp wrote: > Wouldn't it worth to try whether passing the > (Abstract)StringBuilder's value+count values to String results in > less temporary object creations and therefore reduce pressure on new > generation (and reduce GC effort)? My idea is to add a field 'shared

Re: RFR: patch to reduce use of many temporary objects in java.util.UUID

2013-11-11 Thread Andreas Rieber
On 11.11.2013 19:39, Steven Schlansker wrote: On Nov 6, 2013, at 4:19 PM, Robert Stupp wrote: Hi, the current implementation of java.util.UUID.fromName() and java.util.UUID.toString() unnecessarily produce a lot of temporary objects. Especially the fromName() method creates some instances o

Re: RFR: patch to reduce use of many temporary objects in java.util.UUID

2013-11-11 Thread Steven Schlansker
On Nov 6, 2013, at 4:19 PM, Robert Stupp wrote: > Hi, > > the current implementation of java.util.UUID.fromName() and > java.util.UUID.toString() unnecessarily produce a lot of temporary objects. > Especially the fromName() method creates some instances of java.lang.Long and > indirectly via

Please help - OSX 10.9 build fails

2013-11-11 Thread Robert Stupp
Hi, I'm trying to build openjdk8 on OSX 10.9 but it fails. The first issue is that cc complains about "undefined symbols __FreeBSD__, __OpenBSD__, __NetBSD". I worked around that by changing the "#elif (symbol)" lines with #endif/#ifdef lines. The next flood of errors look very strange - it se

shared "value" in java.lang.StringBuilder

2013-11-11 Thread Robert Stupp
Hi, I was wondering why the mostly allocated class in nearly all applications is char[]. A deeper inspection showed that a lot of these char[] allocations are "caused" by the code from java.lang.StringBuilder.toString(), which created a copy of its internal char array. Most StringBuilder instan

javac: optimized for-each over RandomAccess List

2013-11-11 Thread Robert Stupp
Hi, is it ok to optimize for-each-loop code generation for instances of java.util.List that also implement java.util.RandomAccess by expanding to List lst$ = listexpr; int len$ = lst$.size(); for (int i$ = 0 ; i$ < len$ ; i$++) { T loopvar = lst$.get(i$);

hg: jdk8/tl/langtools: 8027411: javap tonga tests cleanup: write a java program to test invalid options -h and -b

2013-11-11 Thread christine . lu
Changeset: 658861d1b36e Author:cl Date: 2013-11-04 18:04 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/658861d1b36e 8027411: javap tonga tests cleanup: write a java program to test invalid options -h and -b Reviewed-by: jjg + test/tools/javap/InvalidOptions.java

RFR: patch to reduce use of many temporary objects in java.util.UUID

2013-11-11 Thread Robert Stupp
Hi, the current implementation of java.util.UUID.fromName() and java.util.UUID.toString() unnecessarily produce a lot of temporary objects. Especially the fromName() method creates some instances of java.lang.Long and indirectly via "name.split()" many Strings, an ArrayList, etc. UUID.toString(

hg: jdk8/tl/langtools: 8025844: Need test to provide coverage for new DocumentationTool.Location enum

2013-11-11 Thread christine . lu
Changeset: 106b8fa32d71 Author:cl Date: 2013-11-04 17:38 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/106b8fa32d71 8025844: Need test to provide coverage for new DocumentationTool.Location enum Reviewed-by: jjg + test/tools/javadoc/api/basic/DocumentationToolLocation

Re: [concurrency-interest] FutureTask.cancel(true) should run thread.interrupt within doPrivileged

2013-11-11 Thread √iktor Ҡlang
My ignorance made me surprised that this wasn't the default of the Thread.interrupt method. Cheers, √ On Wed, Oct 2, 2013 at 7:02 PM, Doug Lea wrote: > On 10/02/2013 12:29 PM, Martin Buchholz wrote: > >> FutureTask.cancel(true) invokes thread.interrupt on the thread (if any) >> currently runni

Re: RFR: 8009681: TEST_BUG: MethodExitReturnValuesTest.java fails with when there are unexpected background threads

2013-11-11 Thread Peter Allwin
+1 Thanks, /peter On Oct 18, 2013, at 12:56 PM, Staffan Larsen wrote: > Looks good! > > Thanks, > /Staffan > > On 16 okt 2013, at 14:04, Mikael Auno wrote: > >> This bug got a bit lost from my radar after vacation, but I've picked it >> again now. I've moved Arrays.asList() as suggested. In

hg: jdk8/tl/langtools: 8027530: javap tonga tests cleanup: test -public, -protected, -package, -private options

2013-11-11 Thread christine . lu
Changeset: 126dc007ba3f Author:cl Date: 2013-11-04 18:51 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/126dc007ba3f 8027530: javap tonga tests cleanup: test -public, -protected, -package, -private options Reviewed-by: jjg + test/tools/javap/AccessModifiers.java

答复: Demo for Parallel Core Collection API

2013-11-11 Thread Tristan Yan
Thank you Paul There is one minor question, I can't compile one of your code, then I realized that's because grouping by signature is public static Collector> groupingBy(Function classifier, Collector downstream) Which makes me wonder why we need type A here, why we don't use variant here

RE: Question about FileSystemProvider API in JDK7

2013-11-11 Thread Pisarev, Vitaliy
I appreciate the quick response. I looked at the code of PassThroughFileSystem, and I must say it underlines my point here. In case someone wants to interpose on the default provider, he has to write all this boiler plate code. And unless they are aware of the PassThroughFileSystem, they will

答复: Demo for Parallel Core Collection API

2013-11-11 Thread Tristan Yan
Also there is one more question I missed You suggested ""ParallelCore" is not a very descriptive name. Suggest "streams"." 1) yes we agree this demo is not for parallel computation per se 2) but we do not have a clear demo for parallel computation 3) if we are to rename this, we need to develop a

答复: Demo for Parallel Core Collection API

2013-11-11 Thread Tristan Yan
Hi Paul you have comments "suggest that all streams are sequential. There is an inconsistency in the use and in some cases it is embedded in other stream usages." We do not really understand what exactly is meant, could you elaborate a little bit. Is it because we want to show ppl that we shoul

Re: RFR: JDK-8027645: Pattern.split() with positive lookahead

2013-11-11 Thread Xueming Shen
On 11/11/2013 01:15 AM, Paul Sandoz wrote: On Nov 8, 2013, at 10:56 PM, Xueming Shen wrote: On 11/08/2013 01:19 AM, Paul Sandoz wrote: Hi Sherman. When you say: + * of the stream. A zero-width match at the beginning however never produces + * such empty leading substring. Is it po

hg: jdk8/tl/jdk: 8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)

2013-11-11 Thread michael . x . mcmahon
Changeset: 0e47462f03a0 Author:michaelm Date: 2013-11-11 16:06 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0e47462f03a0 8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win) Reviewed-by: alanb ! test/java/net/URLPermission/nstest/LookupTest.java ! test/java/

hg: jdk8/tl/langtools: 8027375: javac asserts on nested erroneous annotations

2013-11-11 Thread joel . franck
Changeset: f3ca12d680f3 Author:jfranck Date: 2013-11-11 17:26 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/f3ca12d680f3 8027375: javac asserts on nested erroneous annotations Summary: make sure JCAnnotation trees have type != null before annotation processing Reviewe

hg: jdk8/tl/langtools: 8027439: Compile-time error in the case of ((Integer[] & Serializable)new Integer[1]).getClass(); ...

2013-11-11 Thread eric . mccorkle
Changeset: 4788eb38cac5 Author:emc Date: 2013-11-11 09:47 -0500 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/4788eb38cac5 8027439: Compile-time error in the case of ((Integer[] & Serializable)new Integer[1]).getClass() 8027253: javac illegally accepts array as bound Summar

Redundant downcast in openjdk-7u40/jdk/src/share/classes/java/util/Arrays.java

2013-11-11 Thread Alex Yursha
I found a minor issue on openjdk-7u40 sources. Is this the right place to discuss such things and if not could you please give me a hint on where this right place is? I am really lost trying to find the right place to open the issue. The issue itself is laid below. Redundant downcast to java.lang.

Re: [8] Review Request: 8027696 Incorrect copyright header in the tests

2013-11-11 Thread Sergey Bylokhov
Hello. I'll push the changes, if there are no new objections. On 07.11.2013 17:46, Sergey Bylokhov wrote: On 07.11.2013 15:22, Alan Bateman wrote: Thanks Sergey, I sampled a few and they look correct. The only thing is that I'm not sure about is test/Makefile, it's just not clear whether whic

Re: RFR for JDK-7190106 RMI benchmark fails intermittently because of use of fixed port

2013-11-11 Thread Tristan Yan
Hi Stuart Also there is one more solution, which is there is one jdk.testlibrary.Utils.getFreePort() method under test/lib. It's same function as TestLibrary.getUnusedRandomPort() and it has named package. Do you mind I use this one? Since these two functions provide same functionality. Maybe w

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-11 Thread Peter Levart
On 11/05/2013 12:29 AM, Remi Forax wrote: But you are right that there is a performance pothole in the interoperation between lambdas and reflection. This implementation RFE, to use method handles instead of code spinning, would take care of that particular problem: https://bugs.openjdk.java.

hg: jdk8/tl/jdk: 8028102: All test targets, jdk/test/Makefile, fail on Windows

2013-11-11 Thread chris . hegarty
Changeset: b48eded97dff Author:chegar Date: 2013-11-11 10:33 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/b48eded97dff 8028102: All test targets, jdk/test/Makefile, fail on Windows Reviewed-by: mduigou ! test/Makefile

Re: Signature of MethodHandleInfo.reflectAs is not specific enough

2013-11-11 Thread Gernot Neppert
Hmm, maybe I don't understand you correctly, but I can see no compelling need to be able to do "info.reflectAs(AnnotatedElement.class, lookup)", as the method's spec clearly says that it will return one of the three types known to implement java.lang.reflect.Member. Those types all implement java

Re: RFR: JDK-8027645: Pattern.split() with positive lookahead

2013-11-11 Thread Paul Sandoz
On Nov 8, 2013, at 10:56 PM, Xueming Shen wrote: > On 11/08/2013 01:19 AM, Paul Sandoz wrote: >> Hi Sherman. >> >> When you say: >> >> + * of the stream. A zero-width match at the beginning however never >> produces >> + * such empty leading substring. >> >> Is it possible to have a

hg: jdk8/tl/jdk: 8027991: InputStream should be closed in sun.security.tools.jarsigner.Main

2013-11-11 Thread weijun . wang
Changeset: 7304b3195212 Author:weijun Date: 2013-11-11 16:54 +0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7304b3195212 8027991: InputStream should be closed in sun.security.tools.jarsigner.Main Reviewed-by: xuelei ! src/share/classes/sun/security/tools/jarsigner/Main.java

hg: jdk8/tl/jdk: 8028099: Many com/sun/management/OperatingSystemMXBean tests failing with CCE (win)

2013-11-11 Thread alan . bateman
Changeset: 2525b91ca5a6 Author:alanb Date: 2013-11-11 08:36 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2525b91ca5a6 8028099: Many com/sun/management/OperatingSystemMXBean tests failing with CCE (win) Reviewed-by: mchung ! src/windows/classes/sun/management/OperatingSyst

Re: Signature of MethodHandleInfo.reflectAs is not specific enough

2013-11-11 Thread Peter Levart
On 11/11/2013 08:14 AM, Peter Levart wrote: The method could simply be: public T reflect(Lookup lookup); But if one needs to hint the compiler, explicit type parameters can be used as an escape hatch as always: Object o = info.reflect(lookup); Well, well, explicit type parameter