[seam-commits] Seam SVN: r8997 - trunk/src/main/org/jboss/seam/deployment.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Sep 15 23:00:43 EDT 2008
Author: shane.bryzak at jboss.com
Date: 2008-09-15 23:00:43 -0400 (Mon, 15 Sep 2008)
New Revision: 8997
Modified:
trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
Log:
JBSEAM-3407
Modified: trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-09-16 02:10:16 UTC (rev 8996)
+++ trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-09-16 03:00:43 UTC (rev 8997)
@@ -4,6 +4,7 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
@@ -85,7 +86,7 @@
private void addPropertyFromResourceBundle(String key, List<String> values)
{
for (String resourceName : RESOURCE_BUNDLES)
- {
+ {
try
{
// Hard to cache as we have to get it off the correct classloader
@@ -94,8 +95,19 @@
{
URL url = urlEnum.nextElement();
Properties properties = new Properties();
- properties.load(url.openStream());
- addProperty(key, properties.getProperty(key), values);
+ InputStream propertyStream = url.openStream();
+ try
+ {
+ properties.load(propertyStream);
+ addProperty(key, properties.getProperty(key), values);
+ }
+ finally
+ {
+ if (propertyStream != null)
+ {
+ propertyStream.close();
+ }
+ }
}
}
catch (IOException e)
More information about the seam-commits
mailing list