You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/06/12 17:53:48 UTC
karaf git commit: [KARAF-3530] Prevent NPE in InstallKarsMojo
Repository: karaf
Updated Branches:
refs/heads/karaf-3.0.x 858be8c6b -> 4ae2a896f
[KARAF-3530] Prevent NPE in InstallKarsMojo
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/4ae2a896
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/4ae2a896
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/4ae2a896
Branch: refs/heads/karaf-3.0.x
Commit: 4ae2a896fa3b53fc4abd75dae26e0c1a1faab4d9
Parents: 858be8c
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Jun 12 17:53:16 2015 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Jun 12 17:53:16 2015 +0200
----------------------------------------------------------------------
.../apache/karaf/tooling/features/InstallKarsMojo.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/4ae2a896/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
index be97abe..58a3702 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java
@@ -194,23 +194,23 @@ public class InstallKarsMojo extends MojoSupport {
// checking if all startup, installed, and boot features have been resolved
getLog().info("Checking features resolution");
- if (startupFeatures != null) {
+ if (features != null && startupFeatures != null) {
for (String startupFeature : startupFeatures) {
- if (!resolveFeature(features.keySet(), startupFeature)) {
+ if (startupFeature != null && !startupFeature.isEmpty() && !resolveFeature(features.keySet(), startupFeature)) {
throw new MojoFailureException("Startup feature " + startupFeature + " is not resolved. Check that <dependencies/> provide the kar of features repository providing this feature (with compile or runtime scope)");
}
}
}
- if (bootFeatures != null) {
+ if (features != null && bootFeatures != null) {
for (String bootFeature : bootFeatures) {
- if (!resolveFeature(features.keySet(), bootFeature)) {
+ if (bootFeature != null && !bootFeature.isEmpty() && !resolveFeature(features.keySet(), bootFeature)) {
throw new MojoFailureException("Boot feature " + bootFeature + " is not resolved. Check that <dependencies/> provide the kar of features repository providing this feature (with compile or runtime scope)");
}
}
}
- if (installedFeatures != null) {
+ if (features != null && installedFeatures != null) {
for (String installedFeature : installedFeatures) {
- if (!resolveFeature(features.keySet(), installedFeature)) {
+ if (installedFeature != null && !installedFeature.isEmpty() && !resolveFeature(features.keySet(), installedFeature)) {
throw new MojoFailureException("Boot feature " + installedFeature + " is not resolved. Check that <dependencies/> provide the kar of features repository providing this feature (with compile or runtime scope)");
}
}