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

ScriptRunData.java uses bitwise AND instead of logical AND

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • client-libs
    • 2d
    • 5.0
    • b127

         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 ..

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

                Created:
                Updated:
                Resolved: