ScriptRunData.java uses bitwise AND instead of logical AND

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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 ..

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

                Created:
                Updated:
                Resolved: