Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242002

Use stringStream.base() instead of as_string() when applicable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 15
    • hotspot

      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

            jsjolen Johan Sjölen
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: