Author: vrubezhny
Date: 2012-01-11 12:07:12 -0500 (Wed, 11 Jan 2012)
New Revision: 37773
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLClassHyperlinkPartitioner.java
Log:
JBIDE-10572
NullPointerException in ClassHyperlink
Issue is fixed.
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLClassHyperlinkPartitioner.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLClassHyperlinkPartitioner.java 2012-01-11
17:01:44 UTC (rev 37772)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLClassHyperlinkPartitioner.java 2012-01-11
17:07:12 UTC (rev 37773)
@@ -98,6 +98,8 @@
// Check that text is a 'class name'
text = document.get(bStart + start, bEnd - bStart);
int positionInText = offset - start - bStart;
+ if (positionInText >= text.length()) return null;
+
int classNameStart = positionInText;
while (classNameStart > 0 &&
!Character.isWhitespace(text.charAt(classNameStart))) {
classNameStart--;
Show replies by date