Return-Path: Delivered-To: apmail-xerces-commits-archive@www.apache.org Received: (qmail 3060 invoked from network); 14 May 2008 03:21:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 03:21:03 -0000 Received: (qmail 1798 invoked by uid 500); 14 May 2008 03:21:05 -0000 Delivered-To: apmail-xerces-commits-archive@xerces.apache.org Received: (qmail 1774 invoked by uid 500); 14 May 2008 03:21:05 -0000 Mailing-List: contact commits-help@xerces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@xerces.apache.org Received: (qmail 1763 invoked by uid 99); 14 May 2008 03:21:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 20:21:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 03:20:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DF9762388A0D; Tue, 13 May 2008 20:20:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656090 - in /xerces/java/trunk/src/org/apache/xerces/impl/xs: XMLSchemaLoader.java XSLoaderImpl.java util/XSGrammarPool.java Date: Wed, 14 May 2008 03:20:39 -0000 To: commits@xerces.apache.org From: mrglavas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080514032039.DF9762388A0D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mrglavas Date: Tue May 13 20:20:39 2008 New Revision: 656090 URL: http://svn.apache.org/viewvc?rev=656090&view=rev Log: If the XSGrammarPool is empty or if an empty list is passed to the the XSLoader return an XSModel which contains the built-in types instead of returning null. Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java xerces/java/trunk/src/org/apache/xerces/impl/xs/XSLoaderImpl.java xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSGrammarPool.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java?rev=656090&r1=656089&r2=656090&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java Tue May 13 20:20:39 2008 @@ -1062,13 +1062,10 @@ } /* (non-Javadoc) - * @see org.apache.xerces.xs.XSLoader#loadInputList(org.apache.xerces.xs.DOMInputList) + * @see org.apache.xerces.xs.XSLoader#loadInputList(org.apache.xerces.xs.LSInputList) */ public XSModel loadInputList(LSInputList is) { int length = is.getLength(); - if (length == 0) { - return null; - } SchemaGrammar[] gs = new SchemaGrammar[length]; for (int i = 0; i < length; i++) { try { @@ -1100,9 +1097,6 @@ */ public XSModel loadURIList(StringList uriList) { int length = uriList.getLength(); - if (length == 0) { - return null; - } SchemaGrammar[] gs = new SchemaGrammar[length]; for (int i = 0; i < length; i++) { try { Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XSLoaderImpl.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XSLoaderImpl.java?rev=656090&r1=656089&r2=656090&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XSLoaderImpl.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XSLoaderImpl.java Tue May 13 20:20:39 2008 @@ -100,9 +100,6 @@ */ public XSModel loadURIList(StringList uriList) { int length = uriList.getLength(); - if (length == 0) { - return null; - } try { fGrammarPool.clear(); for (int i = 0; i < length; ++i) { @@ -125,9 +122,6 @@ */ public XSModel loadInputList(LSInputList is) { final int length = is.getLength(); - if (length == 0) { - return null; - } try { fGrammarPool.clear(); for (int i = 0; i < length; ++i) { Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSGrammarPool.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSGrammarPool.java?rev=656090&r1=656089&r2=656090&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSGrammarPool.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSGrammarPool.java Tue May 13 20:20:39 2008 @@ -34,6 +34,7 @@ * @version $Id$ */ public class XSGrammarPool extends XMLGrammarPoolImpl { + /** * Return an XSModel that represents components in * the schema grammars in this pool implementation. @@ -48,14 +49,12 @@ list.add(entry.grammar); } } - int size = list.size(); if (size == 0) { - return null; + return new XSModelImpl(new SchemaGrammar[0]); } SchemaGrammar[] gs = (SchemaGrammar[])list.toArray(new SchemaGrammar[size]); return new XSModelImpl(gs); } - } // class XSGrammarPool --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org For additional commands, e-mail: commits-help@xerces.apache.org