Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-14 Thread Vladimir Ivanov
David, John, thanks for review! Best regards, Vladimir Ivanov On 4/14/15 3:47 AM, David Holmes wrote: On 14/04/2015 3:39 AM, Vladimir Ivanov wrote: John, David, thanks for the feedback! What do you think about the following version:

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-13 Thread John Rose
It's good. Nice cleanup. — John On Apr 13, 2015, at 10:39 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: John, David, thanks for the feedback! What do you think about the following version: http://cr.openjdk.java.net/~vlivanov/8057919/webrev.02/jdk

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-13 Thread Vladimir Ivanov
John, David, thanks for the feedback! What do you think about the following version: http://cr.openjdk.java.net/~vlivanov/8057919/webrev.02/jdk http://cr.openjdk.java.net/~vlivanov/8057919/webrev.02/hotspot Best regards, Vladimir Ivanov On 4/10/15 10:15 PM, John Rose wrote: On Apr 9,

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-13 Thread David Holmes
On 14/04/2015 3:39 AM, Vladimir Ivanov wrote: John, David, thanks for the feedback! What do you think about the following version: http://cr.openjdk.java.net/~vlivanov/8057919/webrev.02/jdk http://cr.openjdk.java.net/~vlivanov/8057919/webrev.02/hotspot Looks good - thanks. David Best

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-09 Thread John Rose
On Apr 8, 2015, at 7:52 PM, David Holmes david.hol...@oracle.com wrote: Meta-question: if this is non-Java code then what does/should simpleName even mean? Returns the simple name of the underlying class as given in the source code. If there is no (java) source code does this have any

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-09 Thread David Holmes
Hi Remi, On 9/04/2015 4:10 PM, Rémi Forax wrote: Hi David, The problem is that j.l.i.MethodType.toString uses getSimpleName and j.l i.WrongMethodTypeException uses MethodType.toString. So if getSimpleName returns a blank string, you destroy the debuggability of any invokedynamic/methodhandle

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-09 Thread Rémi Forax
Hi David, The problem is that j.l.i.MethodType.toString uses getSimpleName and j.l i.WrongMethodTypeException uses MethodType.toString. So if getSimpleName returns a blank string, you destroy the debuggability of any invokedynamic/methodhandle calls. regards, Rémi Le 9 avril 2015 04:52:15

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-09 Thread Vladimir Ivanov
David, thanks for the feedback! Updated webrev: http://cr.openjdk.java.net/~vlivanov/8057919/webrev.01/jdk http://cr.openjdk.java.net/~vlivanov/8057919/webrev.01/hotspot I restored original logic and call into VM only if it fails. The logic to compute simple name (Class.getSimpleName())

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-09 Thread Vladimir Ivanov
On 4/9/15 9:10 AM, Rémi Forax wrote: Hi David, The problem is that j.l.i.MethodType.toString uses getSimpleName and j.l i.WrongMethodTypeException uses MethodType.toString. So if getSimpleName returns a blank string, you destroy the debuggability of any invokedynamic/methodhandle calls.

[9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-08 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8057919/webrev.00/jdk http://cr.openjdk.java.net/~vlivanov/8057919/webrev.00/hotspot https://bugs.openjdk.java.net/browse/JDK-8057919 The logic to compute simple name (Class.getSimpleName()) for inner/nested/local classes is tightly coupled with Java naming

Re: [9] RFR (S): Class.getSimpleName() should work for non-JLS compliant class names

2015-04-08 Thread David Holmes
Hi Vladimir, On 9/04/2015 1:41 AM, Vladimir Ivanov wrote: http://cr.openjdk.java.net/~vlivanov/8057919/webrev.00/jdk http://cr.openjdk.java.net/~vlivanov/8057919/webrev.00/hotspot https://bugs.openjdk.java.net/browse/JDK-8057919 The logic to compute simple name (Class.getSimpleName()) for