]> source.dussan.org Git - jgit.git/commit
LfsConnectionFactory#getLfsUrl: Fix unconditional break in for-loop 00/165500/4
authorDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 26 Jun 2020 08:18:08 +0000 (17:18 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 28 Jun 2020 23:57:38 +0000 (08:57 +0900)
commite342d6a2d837aeba20982afe6990ead824278dcd
treef1f3d4beabf260cf26e04d26e67bf8e09f12d1fb
parent14509f4cbbc9d99fd487ee8462dce07eb11909b5
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>
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java