aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2020-06-26 17:18:08 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2020-06-29 08:57:38 +0900
commite342d6a2d837aeba20982afe6990ead824278dcd (patch)
treef1f3d4beabf260cf26e04d26e67bf8e09f12d1fb /org.eclipse.jgit.lfs/src/org/eclipse/jgit
parent14509f4cbbc9d99fd487ee8462dce07eb11909b5 (diff)
downloadjgit-e342d6a2d837aeba20982afe6990ead824278dcd.tar.gz
jgit-e342d6a2d837aeba20982afe6990ead824278dcd.zip
LfsConnectionFactory#getLfsUrl: Fix unconditional break in for-loop
When iterating over the remote URLs to find one that matches "origin", it always exits after the first iteration whether it has found the remote or not. The break should be inside the conditional block so that it exits when "origin" is found, otherwise continues to iterate over the remaining remote URLs. Found by Sonar Lint. Change-Id: Ic969e54071d1cf095334007c1c1bab6579044dd2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java
index cbad1b66a9..7a0ed456c1 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java
@@ -112,8 +112,8 @@ public class LfsConnectionFactory {
remoteUrl = config.getString(
ConfigConstants.CONFIG_KEY_REMOTE, remote,
ConfigConstants.CONFIG_KEY_URL);
+ break;
}
- break;
}
if (lfsUrl == null && remoteUrl != null) {
try {