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

Incorrect use of & in {@code}

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 10, openjfx11
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
      None

      Description

      There are a couple of cases in PixelFormat.java where & is used inside {@code} such that it gets rendered literally in the HTML output as &

      ---------------------
      createByteIndexedPremultipliedInstance
      public static PixelFormat<ByteBuffer> createByteIndexedPremultipliedInstance​(int[] colors)
      Creates a PixelFormat instance describing a pixel layout with the pixels stored as single bytes representing an index into the specified lookup table of premultiplied color values in the INT_ARGB_PRE format.
      Pixels in this format can be decoded using the following sample code:


           int pixel = array[rowstart + x] &amp; 0xff;
           int argb = colors[pixel];

           int alpha = ((argb >> 24) & 0xff);
           int red = ((argb >> 16) & 0xff);
           int green = ((argb >> 8) & 0xff);
           int blue = ((argb ) & 0xff);

      -------------------------------
      createByteIndexedInstance
      public static PixelFormat<ByteBuffer> createByteIndexedInstance​(int[] colors)
      Creates a PixelFormat instance describing a pixel layout with the pixels stored as single bytes representing an index into the specified lookup table of non-premultiplied color values in the INT_ARGB format.
      Pixels in this format can be decoded using the following sample code:


           int pixel = array[rowstart + x] &amp; 0xff;
           int argb = colors[pixel];

           int alpha = ((argb >> 24) & 0xff);
           int red = ((argb >> 16) & 0xff);
           int green = ((argb >> 8) & 0xff);
           int blue = ((argb ) & 0xff);

      --------------------------------------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nlisker Nir Lisker
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: