ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [1/2] ignite git commit: IGNITE-1749 Close input stream.
Date Wed, 28 Oct 2015 09:41:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 ec266e3cd -> 6a35c4c95


IGNITE-1749 Close input stream.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/db3548eb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/db3548eb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/db3548eb

Branch: refs/heads/ignite-843-rc1
Commit: db3548eba2e708f629f63d8557b5de69fcbb04fb
Parents: ec266e3
Author: Vasiliy Sisko <vsisko@gridgain.com>
Authored: Wed Oct 28 16:40:15 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Oct 28 16:40:15 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/routes/generator/generator-java.js               | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/db3548eb/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index 971c87d..32642d5 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -1692,7 +1692,9 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearCfg)
{
             res.line(res.importClass('java.net.URL') + ' res = IgniteConfiguration.class.getResource("/secret.properties");');
             res.line(res.importClass('java.io.File') + ' propsFile = new File(res.toURI());');
             res.line(res.importClass('java.util.Properties') + ' props = new Properties();');
-            res.line('props.load(new ' + res.importClass('java.io.FileInputStream') + '(propsFile));');
+            res.startBlock('try (' + res.importClass('java.io.InputStream') + ' in = new
' + res.importClass('java.io.FileInputStream') + '(propsFile)) {');
+            res.line('props.load(in);');
+            res.endBlock('}');
 
             res.needEmptyLine = true;
         }


Mime
View raw message