Fix Version/s: 17
Compatibility Risk Description:Clients who provide invalid arguments may see new or different exceptions.
Interface Kind:Java API
Document and enforce the conditions under which invalid arguments will cause a
RuntimeException to be thrown by the
LambdaMetafactory methods fail to validate their inputs. When invoked directly (as opposed to standard usage by
javac), invalid arguments lead to unspecified, ad hoc
RuntimeExceptions or other surprising behavior.
Specify four exceptions that can be thrown:
SecurityException. Describe the conditions under which they will be thrown.
This is a behavioral change: certain nonstandard usages of
LambdaMetafactory will result in new or different exceptions.
Also make some clarifying revisions to specification, such as more accurately naming parameters to reflect their behavior rather than the specific way
javac uses them.
Diff of LambdaMetafactory.java is attached. See also the code review.