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

XMLWordPrintable

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

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

              Created:
              Updated:
              Resolved: