-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b72
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
When I get an UnsupportedClassVersionError, the message says "Bad version in .class file." This helps to clarify the nature of the problem, I suppose, but it doesn't offer any information beyond the name of the class. It would be much more helpful if the message printed out the name of the class so I know what needs to be recompiled.
JUSTIFICATION :
In general, error messages should include information that is specific to the actual incident. In the case of an array index out of bounds, for example, the message reports the bad index. With UnsupportedClassVersionError, I want to know if I just need to recompile a specific file or if I need to recompile the entire project, which takes longer. This is a small change, but it would be very helpful when I see this error.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
UnsupportedClassVersionError should report the name of the class that had the bad version number, like this:
java.lang.UnsuportedClassVersionError: CustomWidget.class has a bad
version number.
(I don't really need the version number, that it wouldn't hurt to include that as well, for people who do need it.)
java.lang.UnsuportedClassVersionError: CustomWidget.class has a bad version number of 63.
ACTUAL -
Error message just says this:
java.lang.UnsuportedClassVersionError: Bad version number in .class file
---------- BEGIN SOURCE ----------
This can happen with any source. Compile a source file under Mustang and execute it under Tiger to see this error.
---------- END SOURCE ----------
Release Regression From : 1.4.2_10
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
When I get an UnsupportedClassVersionError, the message says "Bad version in .class file." This helps to clarify the nature of the problem, I suppose, but it doesn't offer any information beyond the name of the class. It would be much more helpful if the message printed out the name of the class so I know what needs to be recompiled.
JUSTIFICATION :
In general, error messages should include information that is specific to the actual incident. In the case of an array index out of bounds, for example, the message reports the bad index. With UnsupportedClassVersionError, I want to know if I just need to recompile a specific file or if I need to recompile the entire project, which takes longer. This is a small change, but it would be very helpful when I see this error.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
UnsupportedClassVersionError should report the name of the class that had the bad version number, like this:
java.lang.UnsuportedClassVersionError: CustomWidget.class has a bad
version number.
(I don't really need the version number, that it wouldn't hurt to include that as well, for people who do need it.)
java.lang.UnsuportedClassVersionError: CustomWidget.class has a bad version number of 63.
ACTUAL -
Error message just says this:
java.lang.UnsuportedClassVersionError: Bad version number in .class file
---------- BEGIN SOURCE ----------
This can happen with any source. Compile a source file under Mustang and execute it under Tiger to see this error.
---------- END SOURCE ----------
Release Regression From : 1.4.2_10
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
- relates to
-
JDK-6707036 VM launcher should better describe supported classfile versions
-
- Closed
-