JDK-8026480 : Unnecessary Signature attribute generated for enum constructors
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-10-15
  • Updated: 2015-02-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.
Other
tbd_majorUnresolved
Related Reports
Relates :  
Description
Consider:
---
enum E { A; }
---

This compiled&decompiled leads to:
---
  private E();
    descriptor: (Ljava/lang/String;I)V
    flags: ACC_PRIVATE
    Code:
      stack=3, locals=3, args_size=3
         0: aload_0       
         1: aload_1       
         2: iload_2       
         3: invokespecial #6                  // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
         6: return        
      LineNumberTable:
        line 1: 0
    Signature: #24                          // ()V
---

The Signature attribute is not mandatory in this case (as the constructor's parameters are not generic). Avoiding the attribute may provide smaller, cleaner classfiles, and so should be considered.