commit | 0a947d58c8fdbb82a818e2db051b6ee88db2d659 | [log] [tgz] |
---|---|---|
author | david_williams <david_williams> | Tue Sep 20 15:57:18 2005 +0000 |
committer | david_williams <david_williams> | Tue Sep 20 15:57:18 2005 +0000 |
tree | b0dd99f5fa2bf351e48cdf068cf31c7991ce30e4 | |
parent | e7c4a5f04d38437f1fa190e4d1699dd445853c68 [diff] |
[109953] NPE's during JSP reconcile/validation
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java index ce56df9..2cdc7e7 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java
@@ -190,6 +190,13 @@ } public int getStartOffset(ITextRegion containedRegion) { + // it is an error to pass null to this method + // ISSUE: need better "spec" on error behavior: + // for now will return zero as this will roughly + // work for some cases (and avoid NPE). + if (containedRegion == null) { + return getStartOffset(); + } return getStartOffset() + containedRegion.getStart(); }