You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/20 19:19:27 UTC
svn commit: r1696824 -
/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
Author: sebb
Date: Thu Aug 20 17:19:27 2015
New Revision: 1696824
URL: http://svn.apache.org/r1696824
Log:
Revert r1696811 - causes several test failures
Not yet obvious why.
Modified:
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java?rev=1696824&r1=1696823&r2=1696824&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassPath.java Thu Aug 20 17:19:27 2015
@@ -188,11 +188,15 @@ public class ClassPath {
* @return input stream for file on class path
*/
public InputStream getInputStream( String name, String suffix ) throws IOException {
+ InputStream is = null;
try {
- return getClass().getClassLoader().getResourceAsStream(name + suffix);
+ is = getClass().getClassLoader().getResourceAsStream(name + suffix);
} catch (Exception e) {
- return getClassFile(name, suffix).getInputStream();
}
+ if (is != null) {
+ return is;
+ }
+ return getClassFile(name, suffix).getInputStream();
}
/**