Re: JDK 9 RFR of JDK-8159330: Improve deprecation text for Class.newInstance

2016-06-12 Thread joe darcy
On 6/12/2016 7:21 PM, Wang Weijun wrote: Why not just clazz.getConstructor().newInstance()? That seems to work to and is much shorter; thanks :-) -Joe + * can be replaced by + * + * {@code + * clazz.getConstructor(new Class[0]).newInstance((Object[])null); + * }

Re: JDK 9 RFR of JDK-8159330: Improve deprecation text for Class.newInstance

2016-06-12 Thread Wang Weijun
Why not just clazz.getConstructor().newInstance()? > + * can be replaced by > + * > + * {@code > + * clazz.getConstructor(new Class[0]).newInstance((Object[])null); > + * }

JDK 9 RFR of JDK-8159330: Improve deprecation text for Class.newInstance

2016-06-12 Thread joe darcy
Hello, After deprecating Class.newInstance recently (JDK-6850612), the deprecation text for it could be a bit more helpful by listing the exact replacement code. Please review the patch below which does this. Thanks, -Joe --- a/src/java.base/share/classes/java/lang/Class.javaSun Jun 12

Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-12 Thread Peter Levart
Hi, Claes, Thanks for starting to look into this. On 06/12/2016 06:28 PM, Claes Redestad wrote: Hi, this seems quite promising. A bit too much to review in one go, but let me start with some musings while I digest it more fully: 49 /** 50 * A special key that is used to overwr

Re: RFR 8139507: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs

2016-06-12 Thread Alan Bateman
On 10/06/2016 17:05, Jan Lahoda wrote: The other Preferences implementations used this pattern, so I used it as well. I don't have a problem with using double-checked locking. Updated webrev: http://cr.openjdk.java.net/~jlahoda/8139507/webrev.01 (updates all the Preferences implementations

Re: JDK 9 RFR of JDK-5041778: (ann) AnnotationFormatError if "default" Class type not found

2016-06-12 Thread Joel Borggrén-Franck
Looks good. I think I would have avoided the nested ifs and just tested for instanceof TypeNotPresentExceptionProxy directly but no big deal. cheers /Joel On Sat, Jun 11, 2016 at 11:30 PM, joe darcy wrote: > Hello, > > Please review these changes to address > > JDK-5041778: (ann) Annotation

Re: JDK 9 RFR of JDK-5040830: (ann) please improve toString() for annotations containing exception proxies

2016-06-12 Thread Joel Borggrén-Franck
Ping! If the slightly irregular format wasn't intentional I think it is worth taking a second pass over this before the toString gets set in stone. On Wed, Jun 1, 2016 at 8:33 PM, Joel Borggrén-Franck wrote: > Hi Joe, > > I noticed you chose the old format for a type mismatch ("class java > ..."

Re: RFR: 8159031: jjs throws NoSuchFileException if ~/.jjs.history does not exist

2016-06-12 Thread Marcus Lagergren
+1 > On 08 Jun 2016, at 13:18, Hannes Wallnöfer > wrote: > > Please review the following changes: > > Bug: https://bugs.openjdk.java.net/browse/JDK-8159031 > JDK webrev: http://cr.openjdk.java.net/~hannesw/8159031/jdk/webrev.00/ > Nashorn webrev: http://cr.openjdk.java.net/~hannesw/8159031/nas

Re: RFR: JDK-8031043 ClassValue's backing map should have a smaller initial size

2016-06-12 Thread Claes Redestad
Hi, this seems quite promising. A bit too much to review in one go, but let me start with some musings while I digest it more fully: 49 /** 50 * A special key that is used to overwrite a key when the entry is removed. 51 */ 52 private static final class Tombstone {