JDK-6998871 : Support making the Throwable.stackTrace field immutable
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-10
  • Updated: 2021-10-18
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b142Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
A follow-up bug to JDK-6991528 to add immutability to handling the Throwable.stackTrace field.  API changes are needed both in the methods of Throwable as well as its serial form.

Comments
PUBLIC COMMENTS See http://hg.openjdk.java.net/jdk7/tl/jdk/rev/a5bb55c7cfde
21-04-2011

PUBLIC COMMENTS From Remi: http://mail.openjdk.java.net/pipermail/core-libs-dev/2010-November/005218.html 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);
09-12-2010

EVALUATION Yes.
10-11-2010