summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2014-07-15 11:22:47 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2014-09-04 11:28:03 +0200
commit0bc98f17b2b3504b1b180a605e45654ace49ef1a (patch)
tree23d21136877be8834969b56fff480ebb3beea735
parent00c4a73fbcedf8696f573c9a749a7d4da70a832f (diff)
downloadjgit-0bc98f17b2b3504b1b180a605e45654ace49ef1a.tar.gz
jgit-0bc98f17b2b3504b1b180a605e45654ace49ef1a.zip
Eliminate warnings for non-nls strings that will never be translated
Some of these eliminations just reduces the number of warnings on lines where messages are constructed that can/will be translated. Change-Id: I6eddb39ccc8f2488741bb58540d9ec5f5665e2c4
-rw-r--r--org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java6
-rw-r--r--org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java27
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java4
7 files changed, 26 insertions, 26 deletions
diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
index 3412476459..9a0e3040fa 100644
--- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
+++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
@@ -87,11 +87,11 @@ public final class TarFormat implements ArchiveCommand.Format<ArchiveOutputStrea
// TarArchiveEntry detects directories by checking
// for '/' at the end of the filename.
- if (path.endsWith("/") && mode != FileMode.TREE)
+ if (path.endsWith("/") && mode != FileMode.TREE) //$NON-NLS-1$
throw new IllegalArgumentException(MessageFormat.format(
ArchiveText.get().pathDoesNotMatchMode, path, mode));
- if (!path.endsWith("/") && mode == FileMode.TREE)
- path = path + "/";
+ if (!path.endsWith("/") && mode == FileMode.TREE) //$NON-NLS-1$
+ path = path + "/"; //$NON-NLS-1$
final TarArchiveEntry entry = new TarArchiveEntry(path);
if (mode == FileMode.TREE) {
diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java
index e58c7e910b..988ef90f9d 100644
--- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java
+++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java
@@ -73,11 +73,11 @@ public final class ZipFormat implements ArchiveCommand.Format<ArchiveOutputStrea
throws IOException {
// ZipArchiveEntry detects directories by checking
// for '/' at the end of the filename.
- if (path.endsWith("/") && mode != FileMode.TREE)
+ if (path.endsWith("/") && mode != FileMode.TREE) //$NON-NLS-1$
throw new IllegalArgumentException(MessageFormat.format(
ArchiveText.get().pathDoesNotMatchMode, path, mode));
- if (!path.endsWith("/") && mode == FileMode.TREE)
- path = path + "/";
+ if (!path.endsWith("/") && mode == FileMode.TREE) //$NON-NLS-1$
+ path = path + "/"; //$NON-NLS-1$
final ZipArchiveEntry entry = new ZipArchiveEntry(path);
if (mode == FileMode.TREE) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java
index ef1d2824b2..616d5b436b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java
@@ -368,7 +368,7 @@ public class ArchiveCommand extends GitCommand<OutputStream> {
mode = FileMode.TREE;
if (mode == FileMode.TREE) {
- fmt.putEntry(outa, name + "/", mode, null);
+ fmt.putEntry(outa, name + "/", mode, null); //$NON-NLS-1$
continue;
}
walk.getObjectId(idBuf, 0);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
index b0cb34c352..13885d370c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
@@ -274,8 +274,8 @@ public class DirCacheEditor extends BaseDirCacheEditor {
*/
public DeleteTree(final String entryPath) {
super(
- (entryPath.endsWith("/") || entryPath.length() == 0) ? entryPath
- : entryPath + "/");
+ (entryPath.endsWith("/") || entryPath.length() == 0) ? entryPath //$NON-NLS-1$
+ : entryPath + "/"); //$NON-NLS-1$
}
public void apply(final DirCacheEntry ent) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index 50701eae2e..330c7d911b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -876,8 +876,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
private static String findRef(String ref, Repository repo)
throws IOException {
if (!ObjectId.isId(ref)) {
- Ref r = repo.getRef(
- Constants.DEFAULT_REMOTE_NAME + "/" + ref);
+ Ref r = repo.getRef(Constants.DEFAULT_REMOTE_NAME + "/" + ref); //$NON-NLS-1$
if (r != null)
return r.getName();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
index 70e458a196..756a161985 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
@@ -180,7 +180,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
throw err;
} catch (SftpException je) {
throw new TransportException("Can't enter " + path + "/objects"
- + ": " + je.getMessage(), je);
+ + ": " + je.getMessage(), je); //$NON-NLS-1$
}
}
@@ -196,7 +196,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
throw err;
} catch (SftpException je) {
throw new TransportException("Can't enter " + p + " from "
- + parent.objectsPath + ": " + je.getMessage(), je);
+ + parent.objectsPath + ": " + je.getMessage(), je); //$NON-NLS-1$
}
}
@@ -267,8 +267,8 @@ public class TransportSftp extends SshTransport implements WalkTransport {
} catch (SftpException je) {
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
throw new FileNotFoundException(path);
- throw new TransportException("Can't get " + objectsPath + "/"
- + path + ": " + je.getMessage(), je);
+ throw new TransportException("Can't get " + objectsPath + "/" //$NON-NLS-2$
+ + path + ": " + je.getMessage(), je); //$NON-NLS-1$
}
}
@@ -280,7 +280,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
return;
throw new TransportException("Can't delete " + objectsPath
- + "/" + path + ": " + je.getMessage(), je);
+ + "/" + path + ": " + je.getMessage(), je); //$NON-NLS-1$//$NON-NLS-2$
}
// Prune any now empty directories.
@@ -318,8 +318,8 @@ public class TransportSftp extends SshTransport implements WalkTransport {
}
}
- throw new TransportException("Can't write " + objectsPath + "/"
- + path + ": " + je.getMessage(), je);
+ throw new TransportException("Can't write " + objectsPath + "/" //$NON-NLS-2$
+ + path + ": " + je.getMessage(), je); //$NON-NLS-1$
}
}
@@ -332,7 +332,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
ftp.rename(lock, path);
} catch (SftpException je) {
throw new TransportException("Can't write " + objectsPath
- + "/" + path + ": " + je.getMessage(), je);
+ + "/" + path + ": " + je.getMessage(), je); //$NON-NLS-1$//$NON-NLS-2$
}
} catch (IOException err) {
try {
@@ -377,6 +377,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
return avail;
}
+ @SuppressWarnings("unchecked")
private void readLooseRefs(final TreeMap<String, Ref> avail,
final String dir, final String prefix)
throws TransportException {
@@ -384,8 +385,8 @@ public class TransportSftp extends SshTransport implements WalkTransport {
try {
list = ftp.ls(dir);
} catch (SftpException je) {
- throw new TransportException("Can't ls " + objectsPath + "/"
- + dir + ": " + je.getMessage(), je);
+ throw new TransportException("Can't ls " + objectsPath + "/" //$NON-NLS-2$
+ + dir + ": " + je.getMessage(), je); //$NON-NLS-1$
}
for (final ChannelSftp.LsEntry ent : list) {
@@ -414,8 +415,8 @@ public class TransportSftp extends SshTransport implements WalkTransport {
} catch (FileNotFoundException noRef) {
return null;
} catch (IOException err) {
- throw new TransportException("Cannot read " + objectsPath + "/"
- + path + ": " + err.getMessage(), err);
+ throw new TransportException("Cannot read " + objectsPath + "/" //$NON-NLS-2$
+ + path + ": " + err.getMessage(), err); //$NON-NLS-1$
}
if (line == null)
@@ -440,7 +441,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
return r;
}
- throw new TransportException("Bad ref: " + name + ": " + line);
+ throw new TransportException("Bad ref: " + name + ": " + line); //$NON-NLS-2$
}
private Storage loose(final Ref r) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
index 20366efdfd..37c9f7b8a4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
@@ -170,7 +170,7 @@ public class HttpSupport {
final String host = c.getURL().getHost();
// The standard J2SE error message is not very useful.
//
- if ("Connection timed out: connect".equals(ce.getMessage()))
+ if ("Connection timed out: connect".equals(ce.getMessage())) //$NON-NLS-1$
throw new ConnectException(MessageFormat.format(JGitText.get().connectionTimeOut, host));
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$
}
@@ -197,7 +197,7 @@ public class HttpSupport {
final String host = c.getURL().getHost();
// The standard J2SE error message is not very useful.
//
- if ("Connection timed out: connect".equals(ce.getMessage()))
+ if ("Connection timed out: connect".equals(ce.getMessage())) //$NON-NLS-1$
throw new ConnectException(MessageFormat.format(
JGitText.get().connectionTimeOut, host));
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$