Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2010-12-27 03:07:52 -0500
committerMilos Kleint2010-12-27 03:07:52 -0500
commita1fb8c4636d527921cd0c5cffc2d6faba981428a (patch)
tree0c0d95f1eada9551458bd901b5a630d003010cbc
parent082ab81a0af426522cd4d82fae18eaf57ada7749 (diff)
downloadm2e-core-a1fb8c4636d527921cd0c5cffc2d6faba981428a.tar.gz
m2e-core-a1fb8c4636d527921cd0c5cffc2d6faba981428a.tar.xz
m2e-core-a1fb8c4636d527921cd0c5cffc2d6faba981428a.zip
MNGECLIPSE-2682 make sure we indeed have an element in our hands, otherwise pass..
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
index cde04d8e..9b239752 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
@@ -429,10 +429,11 @@ public class PomHyperlinkDetector implements IHyperlinkDetector {
if (current == null) {
return null;
}
- Element parent = (Element) current.getParentNode();
- if (parent == null) {
+ current = current.getParentNode();
+ if (current == null || !(current instanceof Element)) {
return null;
}
+ Element parent = (Element) current;
String parentName = parent.getNodeName();
if ("dependency".equals(parentName) || "parent".equals(parentName)
|| "plugin".equals(parentName) || "reportPlugin".equals(parentName)

Back to the top