From a007c68c872dda89d912f8e74e7a74f145bd93c9 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Mon, 17 Aug 2015 21:32:40 -0400 Subject: [PATCH] sdk installer: fix NPE if folder to make executable is missing --- .../helloworld/src/org/mycompany/ConfigurationLogic.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java index d6cd82a784..33919908ca 100644 --- a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java +++ b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java @@ -213,7 +213,8 @@ public void install(Progress progress) throws InstallationException { } private static void setExecutableContents(File parent, String path) { File binDir = new File(parent, path); - for (File file : binDir.listFiles()) { + File[] fileList = binDir.listFiles(); + for (File file : fileList) { try { file.setExecutable(true, false); } catch (Exception ex) {