Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
index 400a7dfe48..835e7b5fd2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
@@ -43,6 +43,8 @@
*/
package org.eclipse.jgit.api;
+import static java.util.Objects.requireNonNull;
+
import java.io.File;
import java.io.IOException;
@@ -220,9 +222,7 @@ public class Git implements AutoCloseable {
}
Git(Repository repo, boolean closeRepo) {
- if (repo == null)
- throw new NullPointerException();
- this.repo = repo;
+ this.repo = requireNonNull(repo);
this.closeRepo = closeRepo;
}

Back to the top