1.1 --- a/emul/src/main/java/java/lang/Throwable.java Sat Sep 29 08:13:32 2012 +0200
1.2 +++ b/emul/src/main/java/java/lang/Throwable.java Sat Sep 29 10:47:42 2012 +0200
1.3 @@ -905,9 +905,9 @@
1.4 * cause} field can hold; both {@code null} and {@code this} are
1.5 * valid values for the field.
1.6 */
1.7 - private void readObject(ObjectInputStream s)
1.8 - throws IOException, ClassNotFoundException {
1.9 - s.defaultReadObject(); // read in all fields
1.10 +// private void readObject(ObjectInputStream s)
1.11 +// throws IOException, ClassNotFoundException {
1.12 +// s.defaultReadObject(); // read in all fields
1.13 // if (suppressedExceptions != null) {
1.14 // List<Throwable> suppressed = null;
1.15 // if (suppressedExceptions.isEmpty()) {
1.16 @@ -927,37 +927,37 @@
1.17 // }
1.18 // suppressedExceptions = suppressed;
1.19 // } // else a null suppressedExceptions field remains null
1.20 -
1.21 - /*
1.22 - * For zero-length stack traces, use a clone of
1.23 - * UNASSIGNED_STACK rather than UNASSIGNED_STACK itself to
1.24 - * allow identity comparison against UNASSIGNED_STACK in
1.25 - * getOurStackTrace. The identity of UNASSIGNED_STACK in
1.26 - * stackTrace indicates to the getOurStackTrace method that
1.27 - * the stackTrace needs to be constructed from the information
1.28 - * in backtrace.
1.29 - */
1.30 - if (stackTrace != null) {
1.31 - if (stackTrace.length == 0) {
1.32 - stackTrace = UNASSIGNED_STACK.clone();
1.33 - } else if (stackTrace.length == 1 &&
1.34 - // Check for the marker of an immutable stack trace
1.35 - SentinelHolder.STACK_TRACE_ELEMENT_SENTINEL.equals(stackTrace[0])) {
1.36 - stackTrace = null;
1.37 - } else { // Verify stack trace elements are non-null.
1.38 - for(StackTraceElement ste : stackTrace) {
1.39 - if (ste == null)
1.40 - throw new NullPointerException("null StackTraceElement in serial stream. ");
1.41 - }
1.42 - }
1.43 - } else {
1.44 - // A null stackTrace field in the serial form can result
1.45 - // from an exception serialized without that field in
1.46 - // older JDK releases; treat such exceptions as having
1.47 - // empty stack traces.
1.48 - stackTrace = UNASSIGNED_STACK.clone();
1.49 - }
1.50 - }
1.51 +//
1.52 +// /*
1.53 +// * For zero-length stack traces, use a clone of
1.54 +// * UNASSIGNED_STACK rather than UNASSIGNED_STACK itself to
1.55 +// * allow identity comparison against UNASSIGNED_STACK in
1.56 +// * getOurStackTrace. The identity of UNASSIGNED_STACK in
1.57 +// * stackTrace indicates to the getOurStackTrace method that
1.58 +// * the stackTrace needs to be constructed from the information
1.59 +// * in backtrace.
1.60 +// */
1.61 +// if (stackTrace != null) {
1.62 +// if (stackTrace.length == 0) {
1.63 +// stackTrace = UNASSIGNED_STACK.clone();
1.64 +// } else if (stackTrace.length == 1 &&
1.65 +// // Check for the marker of an immutable stack trace
1.66 +// SentinelHolder.STACK_TRACE_ELEMENT_SENTINEL.equals(stackTrace[0])) {
1.67 +// stackTrace = null;
1.68 +// } else { // Verify stack trace elements are non-null.
1.69 +// for(StackTraceElement ste : stackTrace) {
1.70 +// if (ste == null)
1.71 +// throw new NullPointerException("null StackTraceElement in serial stream. ");
1.72 +// }
1.73 +// }
1.74 +// } else {
1.75 +// // A null stackTrace field in the serial form can result
1.76 +// // from an exception serialized without that field in
1.77 +// // older JDK releases; treat such exceptions as having
1.78 +// // empty stack traces.
1.79 +// stackTrace = UNASSIGNED_STACK.clone();
1.80 +// }
1.81 +// }
1.82
1.83 /**
1.84 * Write a {@code Throwable} object to a stream.