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

ScriptRunData.java uses bitwise AND instead of logical AND

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b127

      Backports

        Description

         src/java.desktop/share/classes/sun/font/.ScriptRunData.java
        has
               if (cp >= CHAR_START & cp < CHAR_LIMIT) {
        when it clearly means :
               if (cp >= CHAR_START && cp < CHAR_LIMIT) {

        Fortunately in Java precedence rules make this
        equivalent to
               if ((cp >= CHAR_START) & (cp < CHAR_LIMIT)) {
        and the resulting if (boolean-value1 & boolean-value) will end up
        with the intended result anyway.

        But we should still fix it ..

          Activity

          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/deb30488c53c
          User: prr
          Date: 2016-07-01 21:33:03 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/deb30488c53c User: prr Date: 2016-07-01 21:33:03 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/deb30488c53c
          User: amurillo
          Date: 2016-07-13 03:50:56 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/deb30488c53c User: amurillo Date: 2016-07-13 03:50:56 +0000

            People

            • Assignee:
              prr Philip Race
              Reporter:
              prr Philip Race
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: