JDK-8036827 : Incorrect printing of the generic method declaration
  • Type: Bug
  • Component: tools
  • Sub-Component: javap
  • Affected Version: 8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2014-03-06
  • Updated: 2017-01-26
  • Resolved: 2017-01-26
Related Reports
Relates :  
Description
Get javap's output for class that contains generic methods, e.g.
public class Sample {
    public <T> T m1(T a) {
        return null;
    }
}

Method's declaration is printed incorrectly -redundant printing of extends java.lang.Object superclass

For verbose mode:
...........
  public <T extends java.lang.Object> T m1(T);
...........
Comments
Without the -verbose flag, the "extends java.lang.Object" is not printed. $ ./build/linux-x86_64-normal-server-release/images/jdk/bin/javap play/src/JDK_8036827.class Compiled from "JDK_8036827.java" class JDK_8036827 { JDK_8036827(); public <T> T m1(T); } When the -verbose flag is used, it does not seem unreasonable to print out information which is explicitly present in the class file. The code as written was explicitly written as part of JDK-7031005.
26-01-2017

I was too hasty to fill the bug and had used incorrect syntax. Description and priority is updated.
07-03-2014