Skip to content

Commit 83580ff

Browse files
committed
[JENKINS-68562] Minor refactoring
1 parent 1ce443c commit 83580ff

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/hudson/plugins/git/GitSCM.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
import java.io.Serializable;
7979
import java.io.Writer;
8080
import java.nio.file.Files;
81+
import java.nio.file.InvalidPathException;
8182
import java.nio.file.Paths;
8283
import java.text.MessageFormat;
8384
import java.util.AbstractList;
@@ -104,7 +105,6 @@
104105
import hudson.Util;
105106
import hudson.plugins.git.extensions.impl.ScmName;
106107
import hudson.util.LogTaskListener;
107-
import java.nio.file.InvalidPathException;
108108
import java.util.Map.Entry;
109109
import java.util.regex.Matcher;
110110
import java.util.regex.Pattern;
@@ -1409,8 +1409,7 @@ void abortIfSourceIsLocal() throws AbortException {
14091409
private static boolean isRemoteUrlValid(String remoteUrl) {
14101410
if (remoteUrl == null) {
14111411
return true;
1412-
}
1413-
if (remoteUrl.toLowerCase(Locale.ENGLISH).startsWith("file://")) {
1412+
} else if (remoteUrl.toLowerCase(Locale.ENGLISH).startsWith("file://")) {
14141413
return false;
14151414
}
14161415
try {

0 commit comments

Comments
 (0)