JDK-6980096 : JSR 292 reflective lookup should throw checked exceptions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-26
  • Updated: 2011-04-23
  • Resolved: 2011-04-23
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 7
7 b109Fixed
Related Reports
Relates :  
Description
JSR 292 contains a set of reflective methods for producing method handles to access fields and methods of loaded classes.  The methods are found on java.dyn.MethodHandles.Lookup.

When any of these methods fails, it throws a java.dyn.NoAccessException.  In the JSR 292 EDR, this is an unchecked exception, which makes the demos work nicer, but is not consistent with other reflective operations in Java.

In fact, java.dyn.NoAccessException should extend java.lang.ReflectiveOperationException, like the other exceptions thrown by reflective operations.  This will make it a checked exception.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/jdk/rev/d30ca8bcad63
04-12-2010