Author: dazarov
Date: 2010-07-27 04:43:54 -0400 (Tue, 27 Jul 2010)
New Revision: 23743
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
Log:
Updated isOurCase method in order to avoid possible NPE
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-07-27
08:18:54 UTC (rev 23742)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-07-27
08:43:54 UTC (rev 23743)
@@ -73,8 +73,17 @@
private boolean isOurCase(IMarker marker) throws CoreException{
String message = (String)marker.getAttribute(IMarker.MESSAGE);
- final int start = ((Integer)marker.getAttribute(IMarker.CHAR_START)).intValue();
- final int end = ((Integer)marker.getAttribute(IMarker.CHAR_END)).intValue();
+
+ Integer attribute = ((Integer)marker.getAttribute(IMarker.CHAR_START));
+ if(attribute == null)
+ return false;
+ final int start = attribute.intValue();
+
+ attribute = ((Integer)marker.getAttribute(IMarker.CHAR_END));
+ if(attribute == null)
+ return false;
+ final int end = attribute.intValue();
+
if(!message.startsWith("Unknown tag")) //$NON-NLS-1$
return false;
Show replies by date