Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: check for null, since absent delimiter is not an empty string, b…

…ut null :-(
  • Loading branch information...
commit 796ee57d5aef8aa8a05be7664884b4dbc207ee6d 1 parent 313830f
@Oblosys Oblosys authored
View
3  net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/types/Location.java
@@ -131,8 +131,9 @@ public Location(IProject project, String fileName, int startLin, int startCol, i
if (lineTracker != null) {
try {
//System.err.println("Initial span: "+startLine+":"+startColumn+" to "+endLine+":"+endColumn);
+ String delimiter = lineTracker.getLineDelimiter(startLine-1); // apparently this can return null
int lineLength = lineTracker.getLineLength(startLine-1 /*LineTracker is 0 based*/ )
- - lineTracker.getLineDelimiter(startLine-1).length(); // subtract the delimiter length
+ - (delimiter == null ? 0 : delimiter.length()); // subtract the delimiter length
if (startLine==endLine && startColumn==endColumn) { // span is empty
if (startColumn < lineLength) { // not past the last character, so we can extend to the right.
endColumn += 1;
Please sign in to comment.
Something went wrong with that request. Please try again.