[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    svn commit: r558581 -
From:       mrglavas () apache ! org
Date:       2007-07-23 1:38:32
Message-ID: 20070723013832.C1EBB1A981A () eris ! apache ! org
[Download RAW message or body]

Author: mrglavas
Date: Sun Jul 22 18:38:26 2007
New Revision: 558581

URL: http://svn.apache.org/viewvc?view=rev&rev=558581
Log:
Removing "synchronized" from the getInstance() methods. The threading issue that they \
were added to address was eliminated when we started using the ObjectFactory to \
create instances of the DTDDVFactory.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/dv/DTDDVFactory.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/dv/DTDDVFactory.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/dv/DTDDVFactory.java?view=diff&rev=558581&r1=558580&r2=558581
 ==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/dv/DTDDVFactory.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/dv/DTDDVFactory.java Sun Jul 22 \
18:38:26 2007 @@ -41,7 +41,7 @@
      * @exception DVFactoryException  cannot create an instance of the specified
      *                                class name or the default class name
      */
-    public static synchronized final DTDDVFactory getInstance() throws \
DVFactoryException { +    public static final DTDDVFactory getInstance() throws \
DVFactoryException {  return getInstance(DEFAULT_FACTORY_CLASS);
     }
 
@@ -53,19 +53,19 @@
      * @exception DVFactoryException  cannot create an instance of the specified
      *                                class name or the default class name
      */
-    public static synchronized final DTDDVFactory getInstance(String factoryClass) \
                throws DVFactoryException {
-
+    public static final DTDDVFactory getInstance(String factoryClass) throws \
DVFactoryException {  try {
             // if the class name is not specified, use the default one
             return (DTDDVFactory)
                 (ObjectFactory.newInstance(factoryClass, \
                ObjectFactory.findClassLoader(), true));
-        } catch (ClassCastException e) {
+        } 
+        catch (ClassCastException e) {
             throw new DVFactoryException("DTD factory class " + factoryClass + " \
does not extend from DTDDVFactory.");  }
     }
 
     // can't create a new object of this class
-    protected DTDDVFactory(){}
+    protected DTDDVFactory() {}
 
     /**
      * return a dtd type of the given name



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic