You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gl...@apache.org on 2002/05/21 16:50:50 UTC

cvs commit: xml-axis/java/src/org/apache/axis/configuration FileProvider.java

glyn        02/05/21 07:50:50

  Modified:    java/src/org/apache/axis/configuration FileProvider.java
  Log:
  Merge in patch provided by Thomas Sandholm to allow a configuration
  file to be placed in the classpath outside of the Axis engine package.
  
  Revision  Changes    Path
  1.27      +8 -2      xml-axis/java/src/org/apache/axis/configuration/FileProvider.java
  
  Index: FileProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/FileProvider.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- FileProvider.java	29 Mar 2002 00:01:26 -0000	1.26
  +++ FileProvider.java	21 May 2002 14:50:50 -0000	1.27
  @@ -195,8 +195,14 @@
                       myInputStream = new FileInputStream(configFile);
                   } catch (Exception e) {
                       if (searchClasspath) {
  -                        myInputStream = engine.getClass().
  -                            getResourceAsStream(filename);
  +                        // look for custom configuration files outside of engine package
  +                        myInputStream = engine.getClass().getClassLoader().
  +                                getResourceAsStream(filename);
  +                        if (myInputStream == null) { 
  +                            // if not found in classpath fall back to default config file in engine package
  +                            myInputStream = engine.getClass().
  +                                getResourceAsStream(filename);
  +                        }
                       }
                   }
               }