JDK-8026374 : javac accepts void as a method parameter
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7u5
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-13
  • Updated: 2017-05-19
  • Resolved: 2013-11-26
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 8
8 b119Fixed
Related Reports
Relates :  
Description
Filled originally as:
https://netbeans.org/bugzilla/show_bug.cgi?id=237070

javac accepts (produces classfile for):
----
public class C {
    void m(void v) {}
}
----

Attempts to run/load than classfile lead to:
Exception in thread "main" java.lang.ClassFormatError: Method "m" in class C has illegal signature "(V)V"

Reproducible with:
$ javac -fullversion
javac full version "1.7.0-b147"
and with:
$ javac -fullversion
javac full version "1.7.0_05-b06"

But not with (this version correctly produces compile-time errors):
$ javac -fullversion
javac full version "1.6.0_38-b05"

Comments
Release team: Approved for fixing
25-11-2013

8-critical-SQE-OK: fix is small (10 lines excluding tests) and limited in scope and tests are included.
22-11-2013

Release team: Lacks QA approval so we put this in NMI. Sandeep will follow up on this for QA.
21-11-2013