Skip to content

Commit

Permalink
SLE-110 Restore the handling of file level issues (= no text range) (#58
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Janos Gyerik authored Nov 9, 2016
1 parent 5559d6c commit e603520
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Collections;
import java.util.List;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
Expand Down Expand Up @@ -74,8 +75,8 @@ public static void updateAllSonarMarkerSeverity() throws CoreException {
}

@CheckForNull
public static FlatTextRange getFlatTextRange(final IDocument document, TextRange textRange) {
if (textRange.getStartLine() == null) {
public static FlatTextRange getFlatTextRange(final IDocument document, @Nullable TextRange textRange) {
if (textRange == null || textRange.getStartLine() == null) {
return null;
}
if (textRange.getStartLineOffset() == null) {
Expand Down

0 comments on commit e603520

Please sign in to comment.