JDK-8177153 : LambdaMetafactory has default constructor
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-03-20
  • Updated: 2019-09-04
  • Resolved: 2017-05-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b170Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8180035 :  
Description
LambdaMetafactory has a default constructor despite not having any instance members, and not being supposed to be instantiated.
Probably, it should declare a private constructor and have a 'final' modifier (as does StringConcatFactory).
Comments
It would be strongly preferable if LambdaMetafactory was updated in 9 rather than 10 to not be extensible. This reduces the window of it being extended by third parties. This class only has static methods, so the chances of it being extended are slim, currently grepcode.com reports there are no sub-classes in 8. The compatibility risk is very low.
01-05-2017