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

          Attachments

            Issue Links

              Activity

                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: