hg: jdk7/tl/jdk: 6991528: Support making Throwable.suppressedExceptions immutable
Rémi Forax
forax at univ-mlv.fr
Sun Nov 14 19:24:56 UTC 2010
Le 14/11/2010 16:23, joe.darcy at oracle.com a écrit :
> Changeset: e1a1a2f5d7e1
> Author: darcy
> Date: 2010-11-14 07:22 -0800
> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/e1a1a2f5d7e1
>
> 6991528: Support making Throwable.suppressedExceptions immutable
> Reviewed-by: mchung, dholmes
>
> ! src/share/classes/java/lang/StackTraceElement.java
> ! src/share/classes/java/lang/Throwable.java
> ! test/java/lang/Throwable/StackTraceSerialization.java
> ! test/java/lang/Throwable/SuppressedExceptions.java
>
>
Hi Joe,
StackTraceElement.equals checks if methodName is null
even if it can not be null by construction.
Also the code can be a little more efficient
if the lineNumber are checked before checking the declaring class.
The code should be:
return e.lineNumber == lineNumber &&
e.declaringClass.equals(declaringClass) &&
methodName.equals(e.methodName) &&
Objects.equals(fileName, e.fileName);
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20101114/2a087ecf/attachment.html>
More information about the core-libs-dev
mailing list