Re: hg: jdk8/tl/jdk: 8001642: Add Optional, OptionalDouble, OptionalInt, OptionalLong

2013-03-28 Thread Brian Goetz
> Has the optional classes been verified to serialize/deserialize correctly? > They are not serializable. > Finally, are these utilities critical to some other part JDK 8 that they were > pushed out now as opposed to JDK 9? > > They are part of the libraries being added by JSR-335 / Project L

hg: jdk8/tl/jdk: 8019646: Clarify javadoc contract of LambdaMetafactory

2013-10-24 Thread brian . goetz
Changeset: 5fa2fd782993 Author:briangoetz Date: 2013-10-24 13:06 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5fa2fd782993 8019646: Clarify javadoc contract of LambdaMetafactory Reviewed-by: briangoetz, rfield Contributed-by: dan.sm...@oracle.com ! src/share/classes/java/l

hg: jdk8/tl/langtools: 8024930: Re-enable disabled bridging tests

2013-10-30 Thread brian . goetz
Changeset: 62a67e0875ff Author:briangoetz Date: 2013-10-30 14:12 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/62a67e0875ff 8024930: Re-enable disabled bridging tests Reviewed-by: psandoz, rfield ! test/tools/javac/lambdaShapes/org/openjdk/tests/separate/Compiler.java

hg: jdk8/tl/jdk: 8027318: Lambda Metafactory: generate serialization-hostile read/writeObject methods for non-serializable lambdas

2013-10-30 Thread brian . goetz
Changeset: ddb0b681654a Author:briangoetz Date: 2013-10-29 12:31 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ddb0b681654a 8027318: Lambda Metafactory: generate serialization-hostile read/writeObject methods for non-serializable lambdas Reviewed-by: rfield, psandoz ! src/

hg: jdk8/tl/jdk: 8024633: Lambda linkage performance - initialize generated class earlier

2013-10-31 Thread brian . goetz
Changeset: 9732816c9d17 Author:briangoetz Date: 2013-10-29 12:45 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9732816c9d17 8024633: Lambda linkage performance - initialize generated class earlier Reviewed-by: briangoetz, rfield Contributed-by: sergey.kukse...@oracle.com !

hg: jdk8/tl/jdk: 8024637: Lambda linkage performance - use reflection instead of ASM to manipulate parameter types; ...

2013-10-31 Thread brian . goetz
Changeset: 82ee370c3d7e Author:briangoetz Date: 2013-10-31 10:37 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/82ee370c3d7e 8024637: Lambda linkage performance - use reflection instead of ASM to manipulate parameter types 8023984: Lambda linkage performance - use a method r

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Brian Goetz
Ineexof(char) sounds like as fast and simpler? Sent from my iPhone On Nov 5, 2013, at 8:55 AM, Peter Levart wrote: > On 11/04/2013 07:12 PM, robert.fi...@oracle.com wrote: >> Changeset: 51b002381b35 >> Author:rfield >> Date: 2013-11-04 10:12 -0800 >> URL: http://hg.openjdk.java.n

Re: Is there a way to provide a default toString() to an interface?

2014-03-12 Thread Brian Goetz
This is a common question. The short answer is "no". The short explanation of "why not", is that if there's a conflict between a superCLASS method and a superINTERFACE method, the class method wins. Since Object is a class, the toString (or hashCode, or equals) in Object will win over any de

Re: The future of Serialization

2014-08-09 Thread Brian Goetz
I've noticed there's not much interest in improving Serialization on these lists. This makes me wonder if java Serialization has lost relevance in recent years with the rise of protocol buffers apache thrift and other means of data transfer over byte streams. I sense your frustration, but I thi

Re: Lambda in security manager initialization fail

2015-03-30 Thread Brian Goetz
The NPE is at BytecodeDescriptor.parseSig#83, which says: return loader.loadClass(name); so the null ref seems likely to be loader. The loader is initially passed in from BoundMethodHandle#817, which provides a null loader, indicating that it wants the system loader. At th

hg: jdk7/tl/jdk: 7012540: java.util.Objects.nonNull() incorrectly named

2011-02-02 Thread brian . goetz
Changeset: 25462d7eee24 Author:briangoetz Date: 2011-02-02 13:13 -0500 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/25462d7eee24 7012540: java.util.Objects.nonNull() incorrectly named Reviewed-by: darcy, weijun ! src/share/classes/java/io/PrintStream.java ! src/share/classes/jav

Re: Security-related types that are candidates to be FunctionalInterfaces in JDK 8

2013-02-05 Thread Brian Goetz
A significant fraction of the lambda candidates in the JDK are converted to some form of PrivilegedAction. However, at least until there is a significant performance advantage of lambda over inner classes, I think it is probably not worth trying to convert these -- I think the explicitness of

Re: Security-related types that are candidates to be FunctionalInterfaces in JDK 8

2013-02-06 Thread Brian Goetz
I'll just note that @FunctionalInterface is not *required* to convert a lambda to the target type; it is a statement of *design intent* by the interface author (which comes with some compile-time enforcement) that the interface is intended to be used to specify a function-like thing. On 2/6/2

Fwd: [JCP]JSR-383(Java SE 18.3) Public review - JEP 116:Extended Validation SSL Certificates

2017-11-20 Thread Brian Goetz
This was received via the Java SE 10 umbrella JSR comments list; since it relates to JEP 116, I am forwarding it here. Forwarded Message Subject: [JCP]JSR-383(Java SE 18.3) Public review - JEP 116:Extended Validation SSL Certificates Date: Fri, 17 Nov 2017 10:33:41 +

Re: RFR: 8263190: Update java.io, java.math, and java.text to use instanceof pattern variable

2021-03-08 Thread Brian Goetz
Looks good!  Glad to see the Amber features finding their way into the codebase. On 3/8/2021 1:53 PM, Patrick Concannon wrote: Hi, Could someone please review my code for updating the code in the `java.io`, `java.math`, and `java.text` packages to make use of the `instanceof` pattern variabl

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Brian Goetz
On Tue, 25 May 2021 11:49:18 GMT, Tagir F. Valeev wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast out of >> switch expres

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Brian Goetz
On Tue, 25 May 2021 11:49:18 GMT, Tagir F. Valeev wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast out of >> switch expres