JDK 10 RFR JDK-8177153: LambdaMetafactory has default constructor
joe darcy
joe.darcy at oracle.com
Fri Apr 28 21:10:16 UTC 2017
Hello,
As this is a binary incompatible change, effectively removing a public
constructor, I'd prefer if this change got into JDK 9 instead, pending
the review process of course.
(I've thought it would be worthwhile to audit the JDK for default
constructors and/or add a javac lint warning for that situation, but I
haven't done that, yet.)
Thanks,
-Joe
On 4/28/2017 12:53 PM, Paul Sandoz wrote:
> Hi,
>
> This will require that we submit a CSR, when this opens up. (Sorry, i should of realised when suggesting easy bugs.)
>
> Still, i think this change is ok, grepcode.com <http://grepcode.com/> shows no subtypes, and there are only static methods.
>
> So i think we can pursue this once the CSR is ready.
>
> Paul.
>
>> On 28 Apr 2017, at 12:28, Ron Pressler <ron.pressler at oracle.com> wrote:
>>
>> Hi.
>> Please review this trivial fix:
>>
>> -------
>> diff -r 83d37efcd2a5 src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
>> --- a/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java Thu Apr 13 20:35:17 2017 +0000
>> +++ b/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java Fri Apr 28 17:51:42 2017 +0000
>> @@ -213,7 +213,8 @@
>> * methods.
>> * @since 1.8
>> */
>> -public class LambdaMetafactory {
>> +public final class LambdaMetafactory {
>> + private LambdaMetafactory() {}
>>
>> /** Flag for alternate metafactories indicating the lambda object
>> * must be serializable */
>> -------
>>
>> Ron
More information about the core-libs-dev
mailing list