ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject [2/6] ant-ivy git commit: avoid an NPE on malformed p2 repository
Date Mon, 22 Dec 2014 17:37:18 GMT
avoid an NPE on malformed p2 repository

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/10118c9c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/10118c9c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/10118c9c

Branch: refs/heads/master
Commit: 10118c9c1b00d31868d6ab43e8171e3c16efdcfc
Parents: c95e6a3
Author: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Authored: Sun Dec 21 17:29:40 2014 +0100
Committer: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Committed: Sun Dec 21 17:29:40 2014 +0100

----------------------------------------------------------------------
 src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/10118c9c/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
index 42b4b84..1630424 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
@@ -423,6 +423,9 @@ public class P2MetadataParser implements XMLInputParser {
     }
 
     private static String namespace2Type(String namespace) {
+        if (namespace == null) {
+            return null;
+        }
         if (namespace.equals("java.package")) {
             return BundleInfo.PACKAGE_TYPE;
         }


Mime
View raw message