]> source.dussan.org Git - jgit.git/commitdiff
[releng] Fix boxing warning 54/131254/1
authorMichael Keppler <Michael.Keppler@gmx.de>
Sat, 20 Oct 2018 13:19:23 +0000 (15:19 +0200)
committerMichael Keppler <Michael.Keppler@gmx.de>
Sat, 20 Oct 2018 13:20:51 +0000 (15:20 +0200)
Use Integer.valueOf() to avoid the warning by implicit conversion due to
usage as argument object in String.format().

Change-Id: Ib314f629d54ae1ce9729c3837d66ce8982a1898a
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

index 4e712a55677c1d5db446708594ca1389d7a72f42..7924ec8c2375eed6b6b7f9c792b95d70d96dce3a 100644 (file)
@@ -278,7 +278,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
                if (s.getPort() == SSH_PORT) {
                        return s.getHost();
                }
-               return String.format("[%s]:%d", s.getHost(), s.getPort()); //$NON-NLS-1$
+               return String.format("[%s]:%d", s.getHost(), //$NON-NLS-1$
+                               Integer.valueOf(s.getPort()));
        }
 
        private void copyConfigValueToSession(Session session, Config cfg,