changeset 673:ae46ee9bbea0

8021933: Add extra check for fix # JDK-8014530 Reviewed-by: alanb, lancea
author joehw
date Tue, 30 Jul 2013 23:40:58 -0700
parents 010655015017
children 3a6dce39c05c be78d9f152cc
files src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Tue Jul 30 03:02:14 2013 -0700
+++ b/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Tue Jul 30 23:40:58 2013 -0700
@@ -1196,7 +1196,7 @@
                     //Revisit :: IMO this is not right place to check
                     // maxOccurNodeLimit.
                     int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT);
-                    if (max > maxOccurNodeLimit) {
+                    if (max > maxOccurNodeLimit && !fSchemaHandler.fSecureProcessing.isNoLimit(maxOccurNodeLimit)) {
                         reportSchemaFatalError("maxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element);
 
                         // reset max values in case processing continues on error
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Tue Jul 30 03:02:14 2013 -0700
+++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Tue Jul 30 23:40:58 2013 -0700
@@ -298,7 +298,7 @@
                     "FeatureNameNull", null));
         }
         if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
-            return (fSecurityManager != null);
+            return (fSecurityManager !=null && fSecurityManager.isSecureProcessing());
         }
         try {
             return fXMLSchemaLoader.getFeature(name);