jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java
changeset 27111 7a491d709b83
parent 25868 686eef1e7a79
child 33352 35c096b5709c
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Wed Jul 05 20:04:04 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Mon Oct 13 14:09:03 2014 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Copyright 2003-2004 The Apache Software Foundation.
@@ -73,14 +72,11 @@
     public CMNodeFactory() {
     }
 
-    public void reset(XMLComponentManager componentManager){
+    public void reset(XMLComponentManager componentManager) {
         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
         try {
             fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
-            //we are setting the limit of number of nodes to 3times the maxOccur value..
-            if(fSecurityManager != null){
-                maxNodeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY ;
-            }
+            reset();
         }
         catch (XMLConfigurationException e) {
             fSecurityManager = null;
@@ -88,6 +84,13 @@
 
     }//reset()
 
+    public void reset() {
+        // we are setting the limit of number of nodes to 3 times the maxOccurs value.
+        if (fSecurityManager != null) {
+            maxNodeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY ;
+        }
+    }
+
     public CMNode getCMLeafNode(int type, Object leaf, int id, int position) {
         return new XSCMLeaf(type, leaf, id, position) ;
     }