classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] RFC: gnu/java/nio/charset/iconv/IconvProvider.java


From: Ito Kazumitsu
Subject: [cp-patches] RFC: gnu/java/nio/charset/iconv/IconvProvider.java
Date: Sat, 05 Nov 2005 02:01:40 +0900 (JST)

This path should fix the bug #22968 (gnu.java.nio.charset.iconv.IconvProvider:
the constructor must be public).

This patch has already been applied in Kaffe for several months
and has worked fine.


2005-11-04  Ito Kazumitsu  <address@hidden>

        * gnu/java/nio/charset/iconv/IconvProvider.java
        (IconvProvider): Declare the constructor public.

--- gnu/java/nio/charset/iconv/IconvProvider.java.orig  Sun Jul  3 05:32:14 2005
+++ gnu/java/nio/charset/iconv/IconvProvider.java       Sat Nov  5 01:54:51 2005
@@ -62,7 +62,11 @@
         }
     }
 
-  private IconvProvider()
+  // Declaring the construtor public may violate the use of singleton.
+  // But it must be public so that an instance of this class can be
+  // created by Class.newInstance(), which is the case when this provider is
+  // defined in META-INF/services/java.nio.charset.spi.CharsetProvider.
+  public IconvProvider()
   {
     IconvMetaData.setup();
   }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]