Author: sgoeschl
Date: Tue Jul 8 13:53:15 2008
New Revision: 674946
URL: http://svn.apache.org/viewvc?rev=674946&view=rev
Log:
Cleaned up source code
Modified:
turbine/fulcrum/trunk/yaafi/src/java/org/apache/fulcrum/yaafi/framework/util/InputStreamLocator.java
Modified:
turbine/fulcrum/trunk/yaafi/src/java/org/apache/fulcrum/yaafi/framework/util/InputStreamLocator.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/yaafi/src/java/org/apache/fulcrum/yaafi/framework/util/InputStreamLocator.java?rev=674946&r1=674945&r2=674946&view=diff
==============================================================================
---
turbine/fulcrum/trunk/yaafi/src/java/org/apache/fulcrum/yaafi/framework/util/InputStreamLocator.java
(original)
+++
turbine/fulcrum/trunk/yaafi/src/java/org/apache/fulcrum/yaafi/framework/util/InputStreamLocator.java
Tue Jul 8 13:53:15 2008
@@ -126,15 +126,11 @@
{
this.getLogger().debug("Looking for " + location + " using the
class loader");
is = getClass().getResourceAsStream( location );
- }
- if( is == null )
- {
- this.getLogger().warn("Unable to locate " + location);
- }
- else
- {
- this.getLogger().debug("Successfully located " + location);
+ if( is != null )
+ {
+ this.getLogger().debug("Successfully located " + location);
+ }
}
// try to load the last part of the file name using the classloader
@@ -146,15 +142,16 @@
baseName = '/' + new File(location).getName();
this.getLogger().debug("Looking for " + baseName + " using the
class loader");
is = getClass().getResourceAsStream( baseName );
+
+ if( is != null )
+ {
+ this.getLogger().debug("Successfully located " + baseName);
+ }
}
if( is == null )
{
- this.getLogger().warn("Unable to locate " + baseName);
- }
- else
- {
- this.getLogger().debug("Successfully located " + baseName);
+ this.getLogger().warn("Unable to find any resource with the name
'" + location + "'");
}
return is;