- 
    Bug 
- 
    Resolution: Unresolved
- 
     P4 P4
- 
    24, 25
- 
    None
                    The following code in java.desktop/share/classes/java/beans/SimpleBeanInfo.java assumes an ImageProducer returned by URL.getContent()
public Image loadImage(final String resourceName) {
try {
final URL url = getClass().getResource(resourceName);
if (url != null) {
final ImageProducer ip = (ImageProducer) url.getContent();
if (ip != null) {
return Toolkit.getDefaultToolkit().createImage(ip);
}
}
} catch (final Exception ignored) {
}
return null;
}
The spec. doesn't guarantee this.
SimpleBeanInfo should probably be migrated to some other API to interpret the image data
The test java/beans/SimpleBeanInfo/LoadingStandardIcons/LoadingStandardIcons.java
can be used to verify the migration
This would allow us to drop the SPI implemented by
sun/awt/www/content/MultimediaContentHandlers.java
The test java/beans/SimpleBeanInfo/LoadingStandardIcons/LoadingStandardIcons.java will fail if it isn't migrated.
            
public Image loadImage(final String resourceName) {
try {
final URL url = getClass().getResource(resourceName);
if (url != null) {
final ImageProducer ip = (ImageProducer) url.getContent();
if (ip != null) {
return Toolkit.getDefaultToolkit().createImage(ip);
}
}
} catch (final Exception ignored) {
}
return null;
}
The spec. doesn't guarantee this.
SimpleBeanInfo should probably be migrated to some other API to interpret the image data
The test java/beans/SimpleBeanInfo/LoadingStandardIcons/LoadingStandardIcons.java
can be used to verify the migration
This would allow us to drop the SPI implemented by
sun/awt/www/content/MultimediaContentHandlers.java
The test java/beans/SimpleBeanInfo/LoadingStandardIcons/LoadingStandardIcons.java will fail if it isn't migrated.