Re: Suggestion: Add the method isEmpty in the classes StringBuilder and StringBuffer

2013-02-14 Thread Hildeberto Mendonça
I think the + syntax in all possible cases with the maximal performance would be the best option indeed. While we are not there yet, we could go for this small change to improve existing code since the difference of performance is significant. To make this proposal more explicit, I'm going to

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread Florian Weimer
On 02/14/2013 02:32 AM, Martin Buchholz wrote: +#if defined(__GNUC__) (__GNUC__ 4) || (__GNUC__ == 4) (__GNUC_MINOR__ 2) + #define JNIEXPORT __attribute__((visibility(default))) + #define JNIIMPORT __attribute__((visibility(default))) The default compiler in Xcode 4.1 is

RFR 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList

2013-02-14 Thread Chris Hegarty
This test started failing since the integration of new inference scheme in javac [1]. The javac issue is being tracked by 8008200, so I am simply proposing to add this test to the ProblemList until the underlying issue can be resolved. : hg diff ProblemList.txt diff -r e6f34051c60c

Re: RFR 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList

2013-02-14 Thread Maurizio Cimadamore
If we really care about running the test, javac has an hidden flag that can be used to force the old inference scheme (I left that as an emergency hatch in cases like these) - so I believe the test can be compiled by using -XDuseLegacyInference That will essentially force a JDK 7-like

Re: RFR 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList

2013-02-14 Thread Chris Hegarty
I think it is fine to simply exclude the test for now. It can be re-enabled whenever the issue is resolved in javac. -Chris. On 02/14/2013 11:17 AM, Maurizio Cimadamore wrote: If we really care about running the test, javac has an hidden flag that can be used to force the old inference scheme

Re: RFR 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList

2013-02-14 Thread Maurizio Cimadamore
On 14/02/13 11:18, Chris Hegarty wrote: I think it is fine to simply exclude the test for now. It can be re-enabled whenever the issue is resolved in javac. Looks fine - go ahead. Thanks Maurizio -Chris. On 02/14/2013 11:17 AM, Maurizio Cimadamore wrote: If we really care about running the

hg: jdk8/tl/jdk: 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList

2013-02-14 Thread chris . hegarty
Changeset: 153884b550f0 Author:chegar Date: 2013-02-14 13:01 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/153884b550f0 8008201: Add java/lang/Class/asSubclass/BasicUnit.java to the ProblemList Reviewed-by: mcimadamore ! test/ProblemList.txt

Re: IdentityHashMap.[keySet|values|entrySet].toArray speed-up

2013-02-14 Thread Peter Levart
Hello Mike, On 02/13/2013 09:21 PM, Mike Duigou wrote: This looks like excellent contribution Peter! I will proceed with the testing needed to integrate your improved toArray()/toArray(T[]) implementations. I have created an issue, JDK-8008167, for this patch. I am surprised that this

Re: Review for 8006225: tools/jdeps/Basic.java fails with AssertionError

2013-02-14 Thread Alan Bateman
On 14/02/2013 01:52, Mandy Chung wrote: This fixes 8006225: tools/jdeps/Basic.java fails with AssertionError. Webrev: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8006225/webrev.00/ jdeps maintains a static list of analyzed classes, each of which is expected to be from one archive.

Re: IdentityHashMap.[keySet|values|entrySet].toArray speed-up

2013-02-14 Thread Mike Duigou
On Feb 14 2013, at 05:24 , Peter Levart wrote: Hello Mike, On 02/13/2013 09:21 PM, Mike Duigou wrote: This looks like excellent contribution Peter! I will proceed with the testing needed to integrate your improved toArray()/toArray(T[]) implementations. I have created an issue,

Re: [PATCH] Sunbug 7131192: Optimize BigInteger.doubleValue(), floatValue()

2013-02-14 Thread Louis Wasserman
Any update on when this could get reviewed? On Thu, Dec 13, 2012 at 3:36 PM, Louis Wasserman lowas...@google.comwrote: Hi, I'm working at Google now, but I'd like to revive this patch as a contribution from Google. At the moment, what's mainly needed is review for

Re: Review for 8006225: tools/jdeps/Basic.java fails with AssertionError

2013-02-14 Thread Mandy Chung
On 2/14/13 7:43 AM, Alan Bateman wrote: On 14/02/2013 01:52, Mandy Chung wrote: This fixes 8006225: tools/jdeps/Basic.java fails with AssertionError. Webrev: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8006225/webrev.00/ jdeps maintains a static list of analyzed classes, each of which

hg: jdk8/tl/langtools: 8006225: tools/jdeps/Basic.java failes with AssertionError

2013-02-14 Thread mandy . chung
Changeset: 88286a36bb34 Author:mchung Date: 2013-02-14 09:43 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/88286a36bb34 8006225: tools/jdeps/Basic.java failes with AssertionError Reviewed-by: alanb + src/share/classes/com/sun/tools/jdeps/Analyzer.java !

hg: jdk8/tl/jdk: 8008167: IdentityHashMap.[keySet|values|entrySet].toArray speed-up

2013-02-14 Thread mike . duigou
Changeset: e57019d2f34a Author:mduigou Date: 2013-02-13 14:50 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e57019d2f34a 8008167: IdentityHashMap.[keySet|values|entrySet].toArray speed-up Reviewed-by: mduigou, martin Contributed-by: Peter Levart peter.lev...@gmail.com !

RFR JDK-8002390 problems moving files between zip file systems

2013-02-14 Thread Mark Sheppard
Hi Please oblige and review the webrev at http://cr.openjdk.java.net/~sherman/8002390/webrev/ which addresses the issue raised in JDK-8002390 Description: While working with the new ZipFileSystem to modify the contents of a zip file, encountered some issues. The issue occurs when a file

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread David DeHaven
+#if defined(__GNUC__) (__GNUC__ 4) || (__GNUC__ == 4) (__GNUC_MINOR__ 2) + #define JNIEXPORT __attribute__((visibility(default))) + #define JNIIMPORT __attribute__((visibility(default))) The default compiler in Xcode 4.1 is llvm-gcc 4.2, it seems. The conditional above

hg: jdk8/tl/jdk: 8007736: VerifyError for use of static method in interface

2013-02-14 Thread mandy . chung
Changeset: 1405ad6afb1e Author:bharadwaj Date: 2013-02-14 11:09 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1405ad6afb1e 8007736: VerifyError for use of static method in interface Reviewed-by: mchung ! src/share/native/common/check_code.c +

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread David DeHaven
This seems like an obvious improvement. There are already bunches of places in the jdk sources that do things like: ./hotspot/src/cpu/x86/vm/jni_x86.h #if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) #if defined(__GNUC__) (__GNUC__ 4) || (__GNUC__ == 4)

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread Florian Weimer
On 02/14/2013 08:09 PM, David DeHaven wrote: +#if defined(__GNUC__) (__GNUC__ 4) || (__GNUC__ == 4) (__GNUC_MINOR__ 2) + #define JNIEXPORT __attribute__((visibility(default))) + #define JNIIMPORT __attribute__((visibility(default))) The default compiler in Xcode 4.1 is llvm-gcc

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread Martin Buchholz
Alright, let's use gcc's recommended test, and let's add a test for clang (completely untested): diff --git a/src/solaris/javavm/export/jni_md.h b/src/solaris/javavm/export/jni_md.h --- a/src/solaris/javavm/export/jni_md.h +++ b/src/solaris/javavm/export/jni_md.h @@ -26,8 +26,14 @@ #ifndef

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread David DeHaven
+#if defined(__GNUC__) (__GNUC__ 4) || (__GNUC__ == 4) (__GNUC_MINOR__ 2) + #define JNIEXPORT __attribute__((visibility(default))) + #define JNIIMPORT __attribute__((visibility(default))) The default compiler in Xcode 4.1 is llvm-gcc 4.2, it seems. The conditional above

Review 8007703: Remove com.sun.servicetag API

2013-02-14 Thread Mandy Chung
Remove com.sun.servicetag that we no longer support. This includes updates the makefiles and so include build-infra to review this change. It's solely JDK implementation-specific that was added to support JDK product registration and service tag as legacy Sun-software requirement in 2007.

hg: jdk8/tl/jdk: 8008254: j.u.Calendar.JavatimeTest failed at TL b78 pit testing

2013-02-14 Thread xueming . shen
Changeset: 1ce1a307cded Author:sherman Date: 2013-02-15 01:17 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1ce1a307cded 8008254: j.u.Calendar.JavatimeTest failed at TL b78 pit testing Summary: to use j.t.ZoneId zone name to keep round-trip Reviewed-by: okutsu !

Review: 4396272 - Parsing doubles fails to follow IEEE for largest decimal that should yield 0

2013-02-14 Thread Brian Burkhalter
The patch below is as submitted to OpenJDK bugzilla but with enhanced comments. It pertains to the correction loop in the doubleValue() method of FloatingDecimal. The situation appears to arise when the candidate value is less than 2*Double.MIN_NORMAL as for such values the ULP is less than

Re: RFR JDK-8002390 problems moving files between zip file systems

2013-02-14 Thread Xueming Shen
looks good. On 2/14/13 10:34 AM, Mark Sheppard wrote: Hi Please oblige and review the webrev at http://cr.openjdk.java.net/~sherman/8002390/webrev/ which addresses the issue raised in JDK-8002390 Description: While working with the new ZipFileSystem to modify the contents of a zip file,

Re: RFR - 6480539: BigDecimal.stripTrailingZeros() should specify no-op on zero BigDecimals

2013-02-14 Thread Joe Darcy
On 02/08/2013 02:37 PM, Stephen Colebourne wrote: We've established that it causes problems (me and Paul) and that likely workarounds of the bug would not be broken by a fix. The adaptation you and Paul have for the current behavior would not be impacted by a change in the behavior of

Re: Define JNIEXPORT as visibility default with GCC?

2013-02-14 Thread Jeremy Manson
a) I don't know what's going on behind the scenes, but if this sounds like a good idea to folks, can we open a bug and get the process otherwise rolling? b) Martin, where did the 4.2 restriction come from? Both Apple's site and the gcc wiki say that visibility support arrived in 4.0: