Summary
-------
Synchronize the methods of FilteredImageSource to avoid NullPointerExceptions while accessing the HashTable.
Problem
-------
A NullPointerException was observed at java.awt.image.FilteredImageSource.startProduction method.
FilteredImageSource instantiates a HashTable for its operation. The methods- startProduction and requestTopDownLeftRightResend of FilteredImageSource read or update this HashTable in un-synchronized manner. In a multi-threaded environment, the un-synchronized access to the HashTable is susceptible to the exceptions as reported in the bug.
Solution
--------
The proposed solution makes the concerned methods 'synchronized' after duly evaluating possibilities for deadlocks.
Specification
-------------
<code>
/** <br>
* This class is an implementation of the ImageProducer interface which<br>
* takes an existing image and a filter object and uses them to produce<br>
-- * image data for a new filtered version of the original image.<br>
++ * image data for a new filtered version of the original image. Furthermore,<br>
++ * {@code FilteredImageSource} is safe for use by multiple threads.<br>
<br>
-- public void startProduction(ImageConsumer ic) { <br>
++ public synchronized void startProduction(ImageConsumer ic) { <br>
-- public void requestTopDownLeftRightResend(ImageConsumer ic) { <br>
++ public synchronized void requestTopDownLeftRightResend(ImageConsumer ic) { <br>
</code>