-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
9
-
generic
-
generic
Unicode 7 (JDK-8032446) introduced new exceptions that can be padded out better.
Here are some examples from the changeset [1]:
+ count = bd.openings.length;
+ bd.openings = new Opening[count * 2];
+ } catch (Exception e) {
+ throw new OutOfMemoryError("Failed to allocate memory for openings");
+ }
we should print how many Opening objects were being allocated.
+ if (isBigEndian < 0 || 1 < isBigEndian ||
+ charsetFamily != CHAR_SET_ || sizeofUChar != CHAR_SIZE_) {
+ throw new IOException(HEADER_AUTHENTICATION_FAILED_);
+ }
I would like to see isBigEndian and charsetFamily values printed.
+ if (sizeofUDataInfo < 20 || headerSize < (sizeofUDataInfo + 4)) {
+ throw new IOException("Internal Error: Header size error");
+ }
Same again, why don't we print sizeofUDataInfo and headSize details in Exception ?
+ if(indexesLength<=IX_MIN_MAYBE_YES) {
+ throw new IOException("Normalizer2 data: not enough indexes");
+ }
Why don't we print indexesLength ?
Above are just a few examples. there may be some more.
[1] http://hg.openjdk.java.net/jdk9/dev/jdk/rev/86206517258d
Here are some examples from the changeset [1]:
+ count = bd.openings.length;
+ bd.openings = new Opening[count * 2];
+ } catch (Exception e) {
+ throw new OutOfMemoryError("Failed to allocate memory for openings");
+ }
we should print how many Opening objects were being allocated.
+ if (isBigEndian < 0 || 1 < isBigEndian ||
+ charsetFamily != CHAR_SET_ || sizeofUChar != CHAR_SIZE_) {
+ throw new IOException(HEADER_AUTHENTICATION_FAILED_);
+ }
I would like to see isBigEndian and charsetFamily values printed.
+ if (sizeofUDataInfo < 20 || headerSize < (sizeofUDataInfo + 4)) {
+ throw new IOException("Internal Error: Header size error");
+ }
Same again, why don't we print sizeofUDataInfo and headSize details in Exception ?
+ if(indexesLength<=IX_MIN_MAYBE_YES) {
+ throw new IOException("Normalizer2 data: not enough indexes");
+ }
Why don't we print indexesLength ?
Above are just a few examples. there may be some more.
[1] http://hg.openjdk.java.net/jdk9/dev/jdk/rev/86206517258d
- relates to
-
JDK-8032446 Support Unicode 7.0.0 in JDK 9
- Closed