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

StringBuffer API docs need to clarification regarding supplementary.

XMLWordPrintable

    • b40
    • generic
    • generic

      StringBuffer.deleteCharAt(int) does not support supplementary characters nor should it, according to ###@###.###. However, the documentation does not clarify this point, so a user may automatically assume that:

      abc\uD800\uDC00xyz

      and doing a statement like:

      StringBuffer.deleteCharAt(3) would produce "abcxyz" if this method respected supplementary characters. This is not the case. The current implementation would produce "abc\uDC00xyz" which is the correct behavior. Therefore, the documentation for this method needs to specify this so that users do not assume that this method does support supplementary characters.

      ###@###.### 2003-10-17

            okutsu Masayoshi Okutsu
            elousunw Edmund Lou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: