[seam-commits] Seam SVN: r10581 - branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 22 09:41:53 EDT 2009
Author: manaRH
Date: 2009-04-22 09:41:53 -0400 (Wed, 22 Apr 2009)
New Revision: 10581
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/Remoting.java
Log:
JBPAPP-1911
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/Remoting.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/Remoting.java 2009-04-22 13:21:29 UTC (rev 10580)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/Remoting.java 2009-04-22 13:41:53 UTC (rev 10581)
@@ -168,18 +168,25 @@
InputStream in = this.getClass().getClassLoader().getResourceAsStream(
"org/jboss/seam/remoting/" + resourceName);
- if (in != null)
+ try
{
- byte[] buffer = new byte[1024];
- int read = in.read(buffer);
- while (read != -1)
+ if (in != null)
{
- out.write(buffer, 0, read);
- read = in.read(buffer);
+ byte[] buffer = new byte[1024];
+ int read = in.read(buffer);
+ while (read != -1)
+ {
+ out.write(buffer, 0, read);
+ read = in.read(buffer);
+ }
}
+ else
+ log.error(String.format("Resource [%s] not found.", resourceName));
}
- else
- log.error(String.format("Resource [%s] not found.", resourceName));
+ catch (Exception e)
+ {
+ if (in != null) in.close();
+ }
}
}
More information about the seam-commits
mailing list