]> source.dussan.org Git - jgit.git/commitdiff
Silence warnings for non-externalized strings 51/148551/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 29 Aug 2019 07:21:04 +0000 (09:21 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 29 Aug 2019 07:24:40 +0000 (09:24 +0200)
These warnings were missed to address in a0048208 which introduced them.

Change-Id: Ia2d15fdce72c10378d020682b80fe7fc548c0d4c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

index 02cfe90497e731b63b283be67d82968a54c3f084..43067d364d796a6a8af074e285f9ddec2cb7325c 100644 (file)
@@ -654,7 +654,7 @@ public class PackWriter implements AutoCloseable {
        }
 
        /**
-        * @param config configuration related to packfile URIs 
+        * @param config configuration related to packfile URIs
         * @since 5.5
         */
        public void setPackfileUriConfig(PackfileUriConfig config) {
@@ -1223,7 +1223,7 @@ public class PackWriter implements AutoCloseable {
                                CachedPackUriProvider p = packfileUriConfig.cachedPackUriProvider;
                                PacketLineOut o = packfileUriConfig.pckOut;
 
-                               o.writeString("packfile-uris\n");
+                               o.writeString("packfile-uris\n"); //$NON-NLS-1$
                                for (CachedPack pack : cachedPacks) {
                                        CachedPackUriProvider.PackInfo packInfo = p.getInfo(
                                                        pack, packfileUriConfig.protocolsSupported);
@@ -1235,7 +1235,7 @@ public class PackWriter implements AutoCloseable {
                                        }
                                }
                                packfileUriConfig.pckOut.writeDelim();
-                               packfileUriConfig.pckOut.writeString("packfile\n");
+                               packfileUriConfig.pckOut.writeString("packfile\n"); //$NON-NLS-1$
                        } else {
                                unwrittenCachedPacks = cachedPacks;
                        }
index 1e49c7b01f7f2ca1c71add3c46b6b08e244829be..20b45882df915d14f50aad00db1312498c328f92 100644 (file)
@@ -1285,20 +1285,22 @@ public class UploadPack {
                                .format(JGitText.get().unknownTransportCommand, command));
        }
 
+       @SuppressWarnings("nls")
        private List<String> getV2CapabilityAdvertisement() {
                ArrayList<String> caps = new ArrayList<>();
-               caps.add("version 2"); //$NON-NLS-1$
+               caps.add("version 2");
                caps.add(COMMAND_LS_REFS);
-               boolean advertiseRefInWant = transferConfig.isAllowRefInWant() &&
-                               db.getConfig().getBoolean("uploadpack", null, //$NON-NLS-1$
-                                               "advertiserefinwant", true); //$NON-NLS-1$
-               caps.add(
-                               COMMAND_FETCH + '=' +
-                               (transferConfig.isAllowFilter() ? OPTION_FILTER + ' ' : "") + //$NON-NLS-1$
-                               (advertiseRefInWant ? CAPABILITY_REF_IN_WANT + ' ' : "") + //$NON-NLS-1$
-                               (transferConfig.isAllowSidebandAll() ? OPTION_SIDEBAND_ALL + ' ' : "") + //$NON-NLS-1$
-                               (cachedPackUriProvider != null ? "packfile-uris " : "") + // $NON-NLS-1$
-                               OPTION_SHALLOW);
+               boolean advertiseRefInWant = transferConfig.isAllowRefInWant()
+                               && db.getConfig().getBoolean("uploadpack", null,
+                                               "advertiserefinwant", true);
+               caps.add(COMMAND_FETCH + '='
+                               + (transferConfig.isAllowFilter() ? OPTION_FILTER + ' ' : "")
+                               + (advertiseRefInWant ? CAPABILITY_REF_IN_WANT + ' ' : "")
+                               + (transferConfig.isAllowSidebandAll()
+                                               ? OPTION_SIDEBAND_ALL + ' '
+                                               : "")
+                               + (cachedPackUriProvider != null ? "packfile-uris " : "")
+                               + OPTION_SHALLOW);
                caps.add(CAPABILITY_SERVER_OPTION);
                return caps;
        }