sandygao    2003/01/29 07:06:33

  Modified:    java/src/org/apache/xerces/impl/xs XMLSchemaLoader.java
  Log:
  Fixing a class cast exception: actual values of list types are no longer of type
  Object[].
  
  Revision  Changes    Path
  1.16      +3 -19     
xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
  
  Index: XMLSchemaLoader.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XMLSchemaLoader.java      17 Jan 2003 19:43:01 -0000      1.15
  +++ XMLSchemaLoader.java      29 Jan 2003 15:06:32 -0000      1.16
  @@ -563,24 +563,8 @@
                   // as xsi:schemaLocation
                   XSAttributeDecl attrDecl = 
SchemaGrammar.SG_XSI.getGlobalAttributeDecl(SchemaSymbols.XSI_SCHEMALOCATION);
                   // validation the string value to get the list of URI's
  -                Object actualValue = attrDecl.fType.validate(sl, null, null);
  -                Object[] uris = (Object[])actualValue;
  -                // if there are even number of URI's
  -                // add them to the location pairs
  -                if (uris.length % 2 == 0) {
  -                    String namespace, location;
  -                    for (int i = 0; i < uris.length;) {
  -                        namespace = (String)uris[i++];
  -                        location = (String)uris[i++];
  -                        LocationArray la = 
((LocationArray)locations.get(namespace));
  -                        if(la == null) {
  -                            la = new LocationArray();
  -                            locations.put(namespace, la);
  -                        }
  -                        la.addLocation(location);
  -                    }
  -                }
  -                else {
  +                attrDecl.fType.validate(sl, null, null);
  +                if (!tokenizeSchemaLocationStr(sl, locations)) {
                       // report warning (odd number of items)
                       er.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
                                      "SchemaLocation",
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to