Author: max.andersen(a)jboss.com
Date: 2009-03-09 09:12:13 -0400 (Mon, 09 Mar 2009)
New Revision: 14105
Modified:
branches/jbosstools-3.0.x/
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
Log:
Merged revisions 14104 via svnmerge from
https://svn.jboss.org/repos/jbosstools/trunk
........
r14104 | max.andersen(a)jboss.com | 2009-03-09 13:56:52 +0100 (Mon, 09 Mar 2009) | 1 line
fixed possible stream leakage for JBIDE-3632
........
Property changes on: branches/jbosstools-3.0.x
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-13898,14088,14102 /branches/ganymede:1-7797 /branches/ganymede/trunk:1-8005
/branches/jbosstools-2.1.x:1-7998,8009-8012,8078-8079
+ /trunk:1-13898,14088,14102,14104 /branches/ganymede:1-7797
/branches/ganymede/trunk:1-8005 /branches/jbosstools-2.1.x:1-7998,8009-8012,8078-8079
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-03-09
12:56:52 UTC (rev 14104)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-03-09
13:12:13 UTC (rev 14105)
@@ -160,14 +160,26 @@
if(getVersion() == SeamVersion.SEAM_2_1) {
Properties seamProperties = new Properties();
File testSeamPropertiesFile = new File(testSrcDir, "seam.properties");
+ FileInputStream inStream = null;
+ FileOutputStream out = null;
try {
- seamProperties.load(new FileInputStream(testSeamPropertiesFile));
+ inStream = new FileInputStream(testSeamPropertiesFile);
+ seamProperties.load(inStream);
seamProperties.setProperty("org.jboss.seam.core.init.debug",
"false"); //$NON-NLS-1$ //$NON-NLS-2$
- seamProperties.store(new FileOutputStream(testSeamPropertiesFile), "debug is
explicitly disabled in test to avoid JBIDE-3623");
+
+ out = new FileOutputStream(testSeamPropertiesFile);
+ seamProperties.store(out, "debug is explicitly disabled in test to avoid
JBIDE-3623");
} catch (FileNotFoundException e) {
SeamCorePlugin.getPluginLog().logError(e);
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
+ } finally {
+ if(inStream!=null) {
+ try { inStream.close(); } catch (IOException e) { /**ignore*/ }
+ }
+ if(out!=null) {
+ try { out.close(); } catch (IOException e) { /**ignore*/ }
+ }
}
}