Re: Type of Class

2014-02-21 Thread David Holmes
On 21/02/2014 3:38 AM, Stephen Colebourne wrote: In JDK 5, three methods were added to java.lang.Class [1] - isAnonymousClass() - isLocalClass() - isMemberClass() Unfortunately, these do not cover the complete range of possible types of class. I think they do once you realize that the static

Re: JDK 9 RFR of JDK-8035279: Clean up internal deprecations in BigInteger

2014-02-21 Thread Paul Sandoz
On Feb 21, 2014, at 12:52 AM, Doug Lea d...@cs.oswego.edu wrote: On 02/20/2014 05:11 PM, David Holmes wrote: On 21/02/2014 7:20 AM, Paul Sandoz wrote: On Feb 20, 2014, at 9:09 PM, David Holmes david.hol...@oracle.com wrote: In practice, because there are also final fields in these instances

RFR: 7171390 - The bug describe is a typo

2014-02-21 Thread Hong Dai Thanh
I request that JDK-7171390 be closed, since there is a typo in the bug report Copied from the bug report 1 - String r1=blah - * ^% $^ [gf].replaceAll([a-zA-Z0-9], -); 2 - String r2=blah - * ^% $^ [gf].replaceAll([0-9a-zA-z], -); The regex from String r2 specifies A-z, instead of A-Z. The

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Paul Sandoz
On Feb 20, 2014, at 6:57 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains

Re: Type of Class

2014-02-21 Thread Stephen Colebourne
On 21 February 2014 08:14, David Holmes david.hol...@oracle.com wrote: Would it be reasonable to add the following methods: - isNestedClass() This would be !isTopLevelClass() but otherwise isAnonymousClass() || isLocalClass() || isMemberClass() - isInnerClass() isAnonymousClass() ||

Re: JDK 9 RFR of JDK-8035279: Clean up internal deprecations in BigInteger

2014-02-21 Thread Peter Levart
On 02/21/2014 10:06 AM, Paul Sandoz wrote: I think we should try and use zero, as John says (alas @Stable is package private to j.l.invoke), and replace 0 with another value such as MIN_VALUE if one is unsure of the bounds: int lsb; if ((lsb = lowestSetBit) == 0) { ...

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Vladimir Ivanov
Paul, thanks! Best regards, Vladimir Ivanov On 2/21/14 2:11 PM, Paul Sandoz wrote: On Feb 20, 2014, at 6:57 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev:

Re: RFR: 8032909: XSLT string-length returns incorrect length when string includes complementary chars

2014-02-21 Thread Daniel Fuchs
On 2/20/14 7:44 PM, huizhe wang wrote: Hi Aleksej, The change looks good. It's good to consolidate test cases into a single test for each encoding. Looks good! -- daniel Thanks, Joe On 2/20/2014 6:54 AM, Aleksej Efimov wrote: Hi, There is a problem in XSLT string-length function: When

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Remi Forax
Hi Valdimir, is there a reason to generate try { ... } catch(Throwable t) { if (Klass.isInstance(t)) { ... } throw t; } instead of: try { ... } catch(Klass t) { ... } maybe because the Klass can be resolved by the wrong classloader ? Rémi On 02/21/2014

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Vladimir Ivanov
Remi, Yes, one reason is resolution peculiarities of exception class not located on boot classpath. The other reason is enabling extensive sharing of lambda forms. Best regards, Vladimir Ivanov On 2/21/14 4:33 PM, Remi Forax wrote: Hi Valdimir, is there a reason to generate try {

RFR: JDK-8030780 - test/com/sun/corba/cachedSocket/7056731.sh leaves HelloServer behind

2014-02-21 Thread Mark Sheppard
Hi please oblige and review the follow change http://cr.openjdk.java.net/~msheppar/8030780/webrev/ to address the issue raised in https://bugs.openjdk.java.net/browse/JDK-8030780 summary: if the the java debugger failed to connect to the client, then the sequence of commands which include

Re: Type of Class

2014-02-21 Thread Brian Goetz
I understand why you want this, though I think you’ll find that there are still thousands of other things “missing” from reflection. In the Java 1.0 days, the difference between the Java language and the class file was pretty small. So reflection served as both the class file (VM)

Re: Type of Class

2014-02-21 Thread Joe Darcy
On 02/21/2014 07:40 AM, Brian Goetz wrote: I understand why you want this, though I think you’ll find that there are still thousands of other things “missing” from reflection. In the Java 1.0 days, the difference between the Java language and the class file was pretty small. So reflection

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Christian Thalinger
On Feb 20, 2014, at 9:57 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains

Re: Type of Class

2014-02-21 Thread Stephen Colebourne
But is javax.lang.model a plan for JDK 9? To give some idea of the pain in this area, here is the code I ended up with: if (type.isInterface() || type.isAnnotation() || type.isPrimitive() || type.isArray() || type.isEnum() || type.isSynthetic() || Modifier.isAbstract(type.getModifiers()) ||

RFR: 8035584: (s) ArrayList(c) should avoid inflation if c is empty

2014-02-21 Thread Mike Duigou
Hello all; This changeset consists of two small performance improvements for ArrayList. Both are related to the lazy initialization introduced in JDK-8011200. The first change is in the ArrayList(int capacity) constructor and forces lazy initialization if the requested capacity is zero. It's