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

Synchronization in BufferedImage.setRGB(int x, int y, int rgb) is not necessary

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 10
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b23
    • CPU:
      generic
    • OS:
      generic

      Description

      The method setRGB(int x, int y, int rgb) in BufferedImage is synchronized, but all other methods in this class are not. For example the similar method setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) and get methods getRGB(int x, int y) and getRGB(int, int, int, int, int[], int, int).

      Since the BufferedImage class is not thread safe it is unclear why the only this method is marked as synchronized,

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serb Sergey Bylokhov
              Reporter:
              serb Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: