[9] RFR: 8168921: Inconsistent Annotation.toString() (original) (raw)
Joseph D. Darcy joe.darcy at oracle.com
Wed Nov 2 17:42:35 UTC 2016
- Previous message: [9] RFR: 8168921: Inconsistent Annotation.toString()
- Next message: RFR: 8169020: Add since element to JDBC deprecated methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Looks good Ivan; thanks,
-Joe
On 11/2/2016 8:58 AM, Ivan Gerasimov wrote:
Thank you Joe for review!
On 31.10.2016 20:11, joe darcy wrote: Hi Ivan,
The code change in src look fine, but please update the existing test test/java/lang/annotation/AnnotationToStringTest.java rather than introducing a new test file. Yes, right, this is better. Here's the updated webrev: http://cr.openjdk.java.net/~igerasim/8168921/01/webrev/ With kind regards, Ivan Thanks, -Joe
On 10/29/2016 6:42 PM, Ivan Gerasimov wrote: Hello! Suppose an annotation is of form @interface MyAnnotation { long value(); } Create the annotation object with sun.reflect.annotation.AnnotationParser.annotationForMap(MyAnnotation.class, Map.of("value", somevalue)). Annotation.toString() method, called for the object, will produce a string containing that 'somevalue' with the optional 'L' suffix appended. Normally, the suffix is not appended for values that can be represented with int, and is appended otherwise. However, the logic does not hold for values Long.MINVALUE and Integer.MINVALUE: For the former the suffix is not appended and for the later the suffix L is appended. Would you please help review the fix, which removes this tiny inconsistency? BUGURL: https://bugs.openjdk.java.net/browse/JDK-8168921 WEBREV: http://cr.openjdk.java.net/~igerasim/8168921/00/webrev/ I also took a chance to perform some pico-optimizations around the modified code. With kind regards, Ivan
- Previous message: [9] RFR: 8168921: Inconsistent Annotation.toString()
- Next message: RFR: 8169020: Add since element to JDBC deprecated methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]