Description
When compiling this code:
public class OuterPlusEnum {
enum E {
E1
}
public int m (E e) {
switch (e) {
case E1:
return 0;
}
return -1;
}
}
The CP for classes OuterPlusEnum$1 and OuterPlusEnum will have an empty UTF8 corresponding to the empy name for class OuterPlusEnum$1. This entry could be saved with a simple check on the class name.
public class OuterPlusEnum {
enum E {
E1
}
public int m (E e) {
switch (e) {
case E1:
return 0;
}
return -1;
}
}
The CP for classes OuterPlusEnum$1 and OuterPlusEnum will have an empty UTF8 corresponding to the empy name for class OuterPlusEnum$1. This entry could be saved with a simple check on the class name.
Attachments
Issue Links
- relates to
-
JDK-8009995 javac, class file library should remove unused entries in the constant pool
- Open