JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that ... In the code for the Inner constructor, you use an accessor method to ...
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that ... In the code for the Inner constructor, you use an accessor method to ...
It's an error in java.lang.String source code which is the same for all JDK distributions.I have created a more simple example class which demonstrates this behaviour very clearly. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : See bug ID 4637640.
If the String passed to the BigInteger(String, int) constructor begins with "-- " (two minus signs), or "-0-" then a BigInteger object is created even though such a String is badly formatted.Example: import java.math.BigInteger
However, that assumption was flawed since assuming the platform's default Charset can often cause confusion and lead to error-prone code in situations where the default Charset is not appropriate. Solution -. Add constructors that explicitly take a Charset parameter.
A DESCRIPTION OF THE PROBLEM : There is a different handling for final member in constructor: Accessing by this or without this lead to a compile error or does not.EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - I'd prefer to get a compile error for FinalClass, too.
User code that wants to indicate that some error has occurred during initialization should use some other exception type. The no-arg and String-bearing constructors initialize the "cause" to null, which results in subsequent calls to initCause() always throwing IllegalStateException.