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

java.lang.String concatenation spec is unnecessarily strong

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b117

      Description

      JLS 15.18.1, "String Concatenation Operator +" does not mandate any specific implementation for String concatenation.

      The Javadoc for java.lang.String makes an unnecessarily stronger claim:
        * The Java language provides special support for the string
        * concatenation operator ( + ), and for conversion of
        * other objects to strings. String concatenation is implemented
        * through the {@code StringBuilder}(or {@code StringBuffer})
        * class and its {@code append} method.

      We should relax this in Javadoc too.

        Attachments

          Activity

            People

            Assignee:
            shade Aleksey Shipilev
            Reporter:
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: