Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
FULL PRODUCT VERSION : Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) ADDITIONAL OS VERSION INFORMATION : Darwin retina.dellroad.org 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 A DESCRIPTION OF THE PROBLEM : Class name is repeated in output of Type.toString() for inner class. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Compile and run this program: public class xx { public static void main(String[] args) throws Exception { System.out.println(xx.class.getMethod("foo").getGenericReturnType()); } public java.util.Map.Entry<String, String> foo() { return null; } } 2. Note bogus output EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - java.util.Map$Entry<java.lang.String, java.lang.String> ACTUAL - java.util.Map.java.util.Map$Entry<java.lang.String, java.lang.String> REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public class xx { public static void main(String[] args) throws Exception { System.out.println(xx.class.getMethod("foo").getGenericReturnType()); } public java.util.Map.Entry<String, String> foo() { return null; } } ---------- END SOURCE ----------
|