changeset 376:b519b554f589

7147666: High lock time for com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance() Reviewed-by: andrew, alanb, lancea
author joehw
date Tue, 06 Mar 2012 09:52:17 -0800
parents 82c5b3166b31
children 6048e224bd34
files src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java	Thu Feb 23 15:14:30 2012 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java	Tue Mar 06 09:52:17 2012 -0800
@@ -45,7 +45,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);
     }
 
@@ -57,19 +57,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, 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