Author: nbubna
Date: Fri Aug 10 09:48:37 2007
New Revision: 564671
URL: http://svn.apache.org/viewvc?view=rev&rev=564671
Log:
clean up a finally() clause
Modified:
velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
Modified:
velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
URL:
http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java?view=diff&rev=564671&r1=564670&r2=564671
==============================================================================
---
velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
(original)
+++
velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
Fri Aug 10 09:48:37 2007
@@ -420,17 +420,16 @@
}
finally
{
- try
+ if (inputStream != null)
{
- if (inputStream != null)
+ try
{
inputStream.close();
}
- }
- catch (IOException ioe)
- {
- // potential memory leak here? should we throw a
RuntimeException?
- return null;
+ catch (IOException ioe)
+ {
+ throw new RuntimeException("Could not close input stream
for "+path, ioe);
+ }
}
}
return config;