diff options
author | Mark Wielaard <mark@klomp.org> | 2005-09-02 09:15:21 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2005-09-02 09:15:21 +0000 |
commit | d9ec7bd5a96a6ec657aadc14a8c9f5ab39c817df (patch) | |
tree | 37a857138384c51d2e48209edfe7079bb926d99a /javax/imageio | |
parent | df841d865686120bda5c056f45f63784de7d80c8 (diff) | |
download | classpath-d9ec7bd5a96a6ec657aadc14a8c9f5ab39c817df.tar.gz |
* gnu/java/awt/ClasspathToolkit.java (registerImageIOSpis):
Reintroduced (empty) method.
* gnu/java/awt/peer/gtk/GtkToolkit.java (static): Moved initialization
of imageIOSpis to new registerImageIOSpis() method.
(registerImageIOSpis): New (overloaded) method.
* javax/imageio/spi/IIORegistry.java (IIORegistry): Call to Toolkit
registration method if instanceof ClasspathToolkit.
Diffstat (limited to 'javax/imageio')
-rw-r--r-- | javax/imageio/spi/IIORegistry.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/javax/imageio/spi/IIORegistry.java b/javax/imageio/spi/IIORegistry.java index 2024a69b0..3e9b2c289 100644 --- a/javax/imageio/spi/IIORegistry.java +++ b/javax/imageio/spi/IIORegistry.java @@ -39,6 +39,7 @@ exception statement from your version. */ package javax.imageio.spi; import gnu.classpath.ServiceFactory; +import gnu.java.awt.ClasspathToolkit; import java.awt.Toolkit; import java.util.HashMap; @@ -62,6 +63,7 @@ public final class IIORegistry extends ServiceRegistry public static synchronized IIORegistry getDefaultInstance() { + // XXX: This leaks memory if a ThreadGroup isn't available anymore. ThreadGroup group = Thread.currentThread().getThreadGroup(); IIORegistry registry = (IIORegistry) instances.get(group); @@ -81,6 +83,8 @@ public final class IIORegistry extends ServiceRegistry // XXX: Register built-in Spis here. Toolkit toolkit = Toolkit.getDefaultToolkit(); + if (toolkit instanceof ClasspathToolkit) + ((ClasspathToolkit)toolkit).registerImageIOSpis(this); registerApplicationClasspathSpis(); } |