Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-10644

JsopBuilder: remove JDK6ism

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.62.0, 1.22.20
    • commons
    • None

    Description

                  default:
                      if (c < ' ') {
                          buff.append(String.format("\\u%04x", (int) c));
                      } else if (c >= 0xd800 && c <= 0xdbff) {
                          // isSurrogate(), only available in Java 7
                          if (i < length - 1 && Character.isSurrogatePair(c, s.charAt(i + 1))) {
                              // ok surrogate
                              buff.append(c);
                              buff.append(s.charAt(i + 1));
                              i += 1;
                          } else {
                              // broken surrogate -> escape
                              buff.append(String.format("\\u%04x", (int) c));
                          }
                      } else {
                          buff.append(c);
                      }
      

      Attachments

        Issue Links

          Activity

            People

              reschke Julian Reschke
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: