ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-2287 Fixed of loading secret.properties.
Date Sat, 20 Feb 2016 09:00:53 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 a78f2a5b5 -> 6212669f1


IGNITE-2287 Fixed of loading secret.properties.


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

Branch: refs/heads/ignite-843-rc2
Commit: 6212669f15129d0c2faa4c571c20dd7a65107066
Parents: a78f2a5
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Sat Feb 20 16:01:12 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Sat Feb 20 16:01:12 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/helpers/generator/generator-java.js   | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6212669f/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index 87255c4..3d83605 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -2426,24 +2426,12 @@ $generatorJava.tryLoadSecretProperties = function (cluster, res) {
         $generatorJava.declareVariableCustom(res, 'props', 'java.util.Properties', 'new Properties()',
'private static final');
 
         res.startBlock('static {');
-
-        $generatorJava.declareVariableCustom(res, 'res', 'java.net.URL', 'IgniteConfiguration.class.getResource("/secret.properties")');
-
-        res.startBlock('try {');
-
-        $generatorJava.declareVariableCustom(res, 'propsFile', 'java.io.File', 'new File(res.toURI())');
-
-        res.needEmptyLine = true;
-
-        res.startBlock('try (' + res.importClass('java.io.InputStream') + ' in = new ' +
res.importClass('java.io.FileInputStream') + '(propsFile)) {');
+        res.startBlock('try (' + res.importClass('java.io.InputStream') + ' in = IgniteConfiguration.class.getClassLoader().getResourceAsStream("secret.properties"))
{');
         res.line('props.load(in);');
         res.endBlock('}');
-
-        res.endBlock('}');
         res.startBlock('catch (Exception ignored) {');
         res.line('// No-op.');
         res.endBlock('}');
-
         res.endBlock('}');
 
         res.needEmptyLine = true;


Mime
View raw message