karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject karaf git commit: [KARAF-4863] Make some files optional when copying config files during child instance creation
Date Tue, 29 Nov 2016 12:12:41 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 5892f7d09 -> 1f4d8a117


[KARAF-4863] Make some files optional when copying config files during child instance creation

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

Branch: refs/heads/master
Commit: 1f4d8a11781b57b756c4844e5b01a780780371c0
Parents: 5892f7d
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Tue Nov 29 13:12:05 2016 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Tue Nov 29 13:12:25 2016 +0100

----------------------------------------------------------------------
 .../karaf/instance/core/internal/InstanceServiceImpl.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/1f4d8a11/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
----------------------------------------------------------------------
diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index 5a3c03b..060f3ac 100644
--- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -1085,7 +1085,11 @@ public class InstanceServiceImpl implements InstanceService {
                 InputStream is = getResourceStream(resource, resources);
                 OutputStream os = new FileOutputStream(outFile)
             ) {
-                copyStream(is, os);
+                if (is == null) {
+                    logInfo("\tWARNING: unable to find %s", true, resource);
+                } else {
+                    copyStream(is, os);
+                }
             }
         }
     }


Mime
View raw message