Author: akarasulu Date: Sat Nov 5 19:35:33 2005 New Revision: 331064 URL: http://svn.apache.org/viewcvs?rev=331064&view=rev Log: slight modification to improve loading of files on classpath Modified: directory/shared/protocol/trunk/common/src/main/java/org/apache/protocol/common/store/LdifFileLoader.java Modified: directory/shared/protocol/trunk/common/src/main/java/org/apache/protocol/common/store/LdifFileLoader.java URL: http://svn.apache.org/viewcvs/directory/shared/protocol/trunk/common/src/main/java/org/apache/protocol/common/store/LdifFileLoader.java?rev=331064&r1=331063&r2=331064&view=diff ============================================================================== --- directory/shared/protocol/trunk/common/src/main/java/org/apache/protocol/common/store/LdifFileLoader.java (original) +++ directory/shared/protocol/trunk/common/src/main/java/org/apache/protocol/common/store/LdifFileLoader.java Sat Nov 5 19:35:33 2005 @@ -240,11 +240,18 @@ { // if file not on system see if something is bundled with the jar ... in = getClass().getResourceAsStream( ldif.getName() ); - - if ( in == null ) + if ( in != null ) + { + return in; + } + + in = ClassLoader.getSystemResourceAsStream( ldif.getName() ); + if ( in != null ) { - throw new FileNotFoundException( "LDIF file does not exist." ); + return in; } + + throw new FileNotFoundException( "LDIF file does not exist." ); } return in;