-
Bug
-
Resolution: Duplicate
-
P4
-
7
-
generic
-
generic
The javac command includes a -Xprint flag that uses annotation processing to output a source-code representation of a type. This flag can be against either source files or class files as the originating location. When the class file for a enum is used as the originating location, a newline is missed after the last enum constant, unliked when a source file is used as the origination location.
It would be good if this discrepency were fixed.
Example:
>javac -Xprint javax.lang.model.SourceVersion
package javax.lang.model;
public enum SourceVersion {
RELEASE_0,
RELEASE_1,
RELEASE_2,
RELEASE_3,
RELEASE_4,
RELEASE_5,
RELEASE_6,
RELEASE_7; private static final javax.lang.model.SourceVersion latestSupported;
private static final java.util.Set<java.lang.String> keywords;
public static javax.lang.model.SourceVersion[] values();
public static javax.lang.model.SourceVersion valueOf(java.lang.String arg0);
private SourceVersion();
public static javax.lang.model.SourceVersion latest();
private static javax.lang.model.SourceVersion getLatestSupported();
public static javax.lang.model.SourceVersion latestSupported();
public static boolean isIdentifier(java.lang.CharSequence arg0);
public static boolean isName(java.lang.CharSequence arg0);
public static boolean isKeyword(java.lang.CharSequence arg0);
}
vs
>javac -Xprint javax/lang/model/SourceVersion.java
package javax.lang.model;
public enum SourceVersion {
RELEASE_0,
RELEASE_1,
RELEASE_2,
RELEASE_3,
RELEASE_4,
RELEASE_5,
RELEASE_6,
RELEASE_7;
public static javax.lang.model.SourceVersion[] values();
public static javax.lang.model.SourceVersion valueOf(java.lang.String name);
private SourceVersion();
public static javax.lang.model.SourceVersion latest();
private static final javax.lang.model.SourceVersion latestSupported;
private static javax.lang.model.SourceVersion getLatestSupported();
public static javax.lang.model.SourceVersion latestSupported();
public static boolean isIdentifier(java.lang.CharSequence name);
public static boolean isName(java.lang.CharSequence name);
private static final java.util.Set<java.lang.String> keywords;
public static boolean isKeyword(java.lang.CharSequence s);
}
It would be good if this discrepency were fixed.
Example:
>javac -Xprint javax.lang.model.SourceVersion
package javax.lang.model;
public enum SourceVersion {
RELEASE_0,
RELEASE_1,
RELEASE_2,
RELEASE_3,
RELEASE_4,
RELEASE_5,
RELEASE_6,
RELEASE_7; private static final javax.lang.model.SourceVersion latestSupported;
private static final java.util.Set<java.lang.String> keywords;
public static javax.lang.model.SourceVersion[] values();
public static javax.lang.model.SourceVersion valueOf(java.lang.String arg0);
private SourceVersion();
public static javax.lang.model.SourceVersion latest();
private static javax.lang.model.SourceVersion getLatestSupported();
public static javax.lang.model.SourceVersion latestSupported();
public static boolean isIdentifier(java.lang.CharSequence arg0);
public static boolean isName(java.lang.CharSequence arg0);
public static boolean isKeyword(java.lang.CharSequence arg0);
}
vs
>javac -Xprint javax/lang/model/SourceVersion.java
package javax.lang.model;
public enum SourceVersion {
RELEASE_0,
RELEASE_1,
RELEASE_2,
RELEASE_3,
RELEASE_4,
RELEASE_5,
RELEASE_6,
RELEASE_7;
public static javax.lang.model.SourceVersion[] values();
public static javax.lang.model.SourceVersion valueOf(java.lang.String name);
private SourceVersion();
public static javax.lang.model.SourceVersion latest();
private static final javax.lang.model.SourceVersion latestSupported;
private static javax.lang.model.SourceVersion getLatestSupported();
public static javax.lang.model.SourceVersion latestSupported();
public static boolean isIdentifier(java.lang.CharSequence name);
public static boolean isName(java.lang.CharSequence name);
private static final java.util.Set<java.lang.String> keywords;
public static boolean isKeyword(java.lang.CharSequence s);
}
- duplicates
-
JDK-6937417 javac -Xprint returns IndexOutOfBoundsException
-
- Closed
-