Goetz Lindenmaier points out[1] that we in some places can skip a ResourceMark needed for ss.as_string() and use ss.base() instead. This is applicable when the string doesn't outlive the stringStream.
While most usage is in error paths, cleaning this up where applicable could have an impact on code size. Improving usage documentation of stringStream.base() would be welcome.
[1] https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-March/038858.html
While most usage is in error paths, cleaning this up where applicable could have an impact on code size. Improving usage documentation of stringStream.base() would be welcome.
[1] https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-March/038858.html
- duplicates
-
JDK-8293251 Use stringStream::base() instead of as_string() when applicable
-
- Resolved
-