RFR: 8291641: Optimize StackTraceElement.toString() [v7]

David Schlosnagle duke at openjdk.org
Tue Aug 9 20:29:33 UTC 2022


On Mon, 8 Aug 2022 18:55:39 GMT, Max Mielchen <duke at openjdk.org> wrote:

>> David Schlosnagle has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/master' into ds/StackTraceElement
>>  - Mark StackTraceElement SerialTest for bug 8291641
>>  - Revert "Mark StackTraceElement SerialTest for bug 8291641"
>>    
>>    This reverts commit e7b04faafb026e61829c81c75121e2d3be6644d9.
>>  - Mark StackTraceElement SerialTest for bug 8291641
>>  - Inline max Integer.stringSize
>>  - Estimate length
>>  - Address comments
>>  - Precompute StackTraceElement toString length
>>  - Merge remote-tracking branch 'origin/master' into ds/StackTraceElement
>>  - Optimize StackTraceElement.toString()
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/2addb249...c9ae3897
>
> src/java.base/share/classes/java/lang/StackTraceElement.java line 357:
> 
>> 355:      * @see    Throwable#printStackTrace()
>> 356:      */
>> 357:     @Override
> 
> The override makes no difference.

ack. I can remove if necessary, but [stylistically prefer to mark overridden methods as such](https://google.github.io/styleguide/javaguide.html#s6.1-override-annotation) (and automatically enforce via [static analysis](https://errorprone.info/bugpattern/MissingOverride) )

-------------

PR: https://git.openjdk.org/jdk/pull/9665


More information about the core-libs-dev mailing list