# HG changeset patch
# User andrew
# Date 1366103090 -3600
# Node ID fb139bed0fc994b5c69c5cfa603838cb73337328
# Parent  73dd61734d71ef01136dee235d441c4039f2d03d
XJC patch from IcedTea

diff --git a/drop_included/jaxws_src/src/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java b/drop_included/jaxws_src/src/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
--- openjdk/jaxws/drop_included/jaxws_src/src/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
+++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
@@ -66,6 +66,13 @@
 
         SchemaFactory sf = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
         sf.setErrorHandler(errorFilter);
+        try {
+            // By default the SchemaFactory imposes a limit of 5000 on
+            // xsd:sequence maxOccurs if a SecurityManager is
+            // installed.  This breaks the specification of xjc,
+            // causing TCK failures.
+            sf.setProperty("http://apache.org/xml/properties/security-manager", null);
+        } catch (SAXException e) {}
         if( entityResolver != null ) {
             sf.setResourceResolver(new LSResourceResolver() {
                 public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
