-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.2_02
-
b12
-
x86
-
solaris_8
-
Not verified
The IllegalArgumentExceptions thrown by java.nio.Buffer do not contain
any text:
$ grep "new IllegalArgumentException" Buffer.java
throw new IllegalArgumentException();
throw new IllegalArgumentException();
throw new IllegalArgumentException();
throw new IllegalArgumentException();
It would be very helpful if the exceptions stated what the illegal value
was, and why it was illegal. For example:
"Position 189 is greater than limit 128"
"Limit 256 is greater than capacity 64"
Or heck, state the values of all relevant parameters and fields as
Josh recomends in "Effective Java":
"...the string representation of an exception should contain the
values of all parameters and fields that contributed to the exception"
Exceptions are often the first step in debugging a problem, and it's
a huge benefit to have useful information in them.
Even though this is not a severe bug, please consider addressing it
soon as it's simple to fix and reaps large rewards.