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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9, 10
    • client-libs
    • 2d
    • b23
    • generic
    • generic

      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,

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

              Created:
              Updated:
              Resolved: