JDK-8001108 : an attempt to use "<init>" as a method name should elicit NoSuchMethodException
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Affected Version: 7,8-pool
  • Submit Date: 2012-10-18
  • Updated Date: 2017-05-17
  • Resolved Date: 2013-10-05
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 Availabitlity Release.

To download the current JDK release, click here.
7u65Resolved 8 b112Fixed
When findVirtual (etc.) is presented with the special name <init>, the answer should always be the same as if some other illegal name (<foo>) were presented, regardless of whether there happens to be a matching constructor present.

This is a gray area in the JSR 292 spec.

The existing OpenJDK behavior is to refuse to admit that a "method" named <init> exists.  We will document this behavior as the standard.
Nighlty resulsts for 7u71 are ok. SQE OK to take the 7u backport to CPU14_03.

webrev: http://cr.openjdk.java.net/~jrose/8001108/webrev.00