You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by pc...@apache.org on 2004/05/13 18:41:57 UTC

cvs commit: xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/tylar DefaultTylarLoader.java

pcal        2004/05/13 09:41:57

  Modified:    v2/src/binding/org/apache/xmlbeans/impl/binding/tylar
                        DefaultTylarLoader.java
  Log:
  more fix for loading nested tylar jars
  
  Revision  Changes    Path
  1.15      +11 -14    xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/tylar/DefaultTylarLoader.java
  
  Index: DefaultTylarLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/tylar/DefaultTylarLoader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultTylarLoader.java	13 May 2004 00:23:32 -0000	1.14
  +++ DefaultTylarLoader.java	13 May 2004 16:41:57 -0000	1.15
  @@ -102,21 +102,15 @@
     public Tylar load(URI uri) throws IOException, XmlException
     {
       if (uri == null) throw new IllegalArgumentException("null uri");
  -    String scheme = uri.getScheme();
  -    if (scheme.equals(FILE_SCHEME)) {
  -      File file = null;
  -      try {
  -        file = new File(uri);
  -      } catch(Exception ignore) {}
  -      if (file != null && file.exists() && file.isDirectory()) {
  -        return ExplodedTylarImpl.load(file);
  -      } else {
  -        return loadFromJar(new JarInputStream(uri.toURL().openStream()),uri);
  -      }
  +    //String scheme = uri.getScheme();
  +    File file = null;
  +    try {
  +      file = new File(uri);
  +    } catch(Exception ignore) {}
  +    if (file != null && file.exists() && file.isDirectory()) {
  +      return ExplodedTylarImpl.load(file);
       } else {
  -      throw new IOException("Sorry, the '"+scheme+
  -                            "' scheme is not supported for loading tylars" +
  -                            "("+uri+")");
  +      return loadFromJar(new JarInputStream(uri.toURL().openStream()),uri);
       }
     }
   
  @@ -128,6 +122,9 @@
       return new CompositeTylar(tylars);
     }
   
  +  /**
  +   * @deprecated
  +   */
     public Tylar load(JarInputStream jar) throws IOException, XmlException {
       if (jar == null) throw new IllegalArgumentException("null stream");
       return loadFromJar(jar,null);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org