]> source.dussan.org Git - jgit.git/commitdiff
Fixing visibility for HostEntry constructors. 23/181323/1
authorDemetr Starshov <dstarshov@google.com>
Wed, 2 Jun 2021 23:19:39 +0000 (16:19 -0700)
committerDemetr Starshov <dstarshov@google.com>
Wed, 2 Jun 2021 23:19:39 +0000 (16:19 -0700)
HostEntry class was public with empty constructor, so adding
constructors with default visibility actually reduced visibility of
constructor.

Change-Id: I4c996c0559102084946ba49a71afe10dda5e0f95

org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java

index 6fbb4c5a077b062717e56cb320572ded96e70c47..228c25f0a5da775aaec41f56164109255de2ca2a 100644 (file)
@@ -482,12 +482,18 @@ public class OpenSshConfigFile implements SshConfigStore {
 
                private final List<String> patterns;
 
-               // Constructor used to build the merged entry; never matches anything
-               HostEntry() {
+               /**
+                * Constructor used to build the merged entry; never matches anything
+                */
+               public HostEntry() {
                        this.patterns = Collections.emptyList();
                }
 
-               HostEntry(List<String> patterns) {
+               /**
+                * @param patterns
+                *            to be used in matching against host name.
+                */
+               public HostEntry(List<String> patterns) {
                        this.patterns = patterns;
                }