Re: [OpenJDK 2D-Dev] RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]
On Thu, 8 Apr 2021 14:43:50 GMT, Andrey Turbanov wrote: >> There are few possible cleanups in java.desktop related to legacy >> StringBuffer usages: >> 1. In few places StringBuffer can be replaced with plain String >> concatenation. >> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better >> performance as it is not thread-safe. >> 3. There are few places where result of string concatenation is passed to >> StringBuffer.append method. Using separate `.append` calls is more clear. >> 4. In few places primitives are unnecessary converted to String before >> `.append` call. They can be replaced with specialized methods (like >> `.append(int)` calls. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8264484: Replace uses of StringBuffer with StringBuilder in > jdk.hotspot.agent > > place each 'append' call on its own line Marked as reviewed by azvegint (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3251
Re: [OpenJDK 2D-Dev] RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]
On Thu, 8 Apr 2021 14:43:50 GMT, Andrey Turbanov wrote: >> There are few possible cleanups in java.desktop related to legacy >> StringBuffer usages: >> 1. In few places StringBuffer can be replaced with plain String >> concatenation. >> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better >> performance as it is not thread-safe. >> 3. There are few places where result of string concatenation is passed to >> StringBuffer.append method. Using separate `.append` calls is more clear. >> 4. In few places primitives are unnecessary converted to String before >> `.append` call. They can be replaced with specialized methods (like >> `.append(int)` calls. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8264484: Replace uses of StringBuffer with StringBuilder in > jdk.hotspot.agent > > place each 'append' call on its own line Marked as reviewed by aivanov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3251
Re: [OpenJDK 2D-Dev] RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]
> There are few possible cleanups in java.desktop related to legacy > StringBuffer usages: > 1. In few places StringBuffer can be replaced with plain String concatenation. > 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better > performance as it is not thread-safe. > 3. There are few places where result of string concatenation is passed to > StringBuffer.append method. Using separate `.append` calls is more clear. > 4. In few places primitives are unnecessary converted to String before > `.append` call. They can be replaced with specialized methods (like > `.append(int)` calls. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent place each 'append' call on its own line - Changes: - all: https://git.openjdk.java.net/jdk/pull/3251/files - new: https://git.openjdk.java.net/jdk/pull/3251/files/963dc56e..d083f953 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=3251=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3251=02-03 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/3251.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3251/head:pull/3251 PR: https://git.openjdk.java.net/jdk/pull/3251