Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
SpotBugs: Dereference of the result of readLine() without nullcheck i…
Browse files Browse the repository at this point in the history
…n pl.project13.maven.git.GitDirLocator.processGitDirFile(File)
  • Loading branch information
TheSnoozer committed Sep 24, 2017
1 parent f536b31 commit 5083c86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/pl/project13/maven/git/GitDirLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ private File processGitDirFile(@NotNull File file) {
// There should be just one line in the file, e.g.
// "gitdir: /usr/local/src/parentproject/.git/modules/submodule"
String line = reader.readLine();

if(line == null) {
return null;
}
// Separate the key and the value in the string.
String[] parts = line.split(": ");

Expand Down

0 comments on commit 5083c86

Please sign in to comment.