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
This commit is contained in:
parent
00c4a73fbc
commit
0bc98f17b2
|
@ -87,11 +87,11 @@ public void putEntry(ArchiveOutputStream out,
|
||||||
|
|
||||||
// TarArchiveEntry detects directories by checking
|
// TarArchiveEntry detects directories by checking
|
||||||
// for '/' at the end of the filename.
|
// 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(
|
throw new IllegalArgumentException(MessageFormat.format(
|
||||||
ArchiveText.get().pathDoesNotMatchMode, path, mode));
|
ArchiveText.get().pathDoesNotMatchMode, path, mode));
|
||||||
if (!path.endsWith("/") && mode == FileMode.TREE)
|
if (!path.endsWith("/") && mode == FileMode.TREE) //$NON-NLS-1$
|
||||||
path = path + "/";
|
path = path + "/"; //$NON-NLS-1$
|
||||||
|
|
||||||
final TarArchiveEntry entry = new TarArchiveEntry(path);
|
final TarArchiveEntry entry = new TarArchiveEntry(path);
|
||||||
if (mode == FileMode.TREE) {
|
if (mode == FileMode.TREE) {
|
||||||
|
|
|
@ -73,11 +73,11 @@ public void putEntry(ArchiveOutputStream out,
|
||||||
throws IOException {
|
throws IOException {
|
||||||
// ZipArchiveEntry detects directories by checking
|
// ZipArchiveEntry detects directories by checking
|
||||||
// for '/' at the end of the filename.
|
// 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(
|
throw new IllegalArgumentException(MessageFormat.format(
|
||||||
ArchiveText.get().pathDoesNotMatchMode, path, mode));
|
ArchiveText.get().pathDoesNotMatchMode, path, mode));
|
||||||
if (!path.endsWith("/") && mode == FileMode.TREE)
|
if (!path.endsWith("/") && mode == FileMode.TREE) //$NON-NLS-1$
|
||||||
path = path + "/";
|
path = path + "/"; //$NON-NLS-1$
|
||||||
|
|
||||||
final ZipArchiveEntry entry = new ZipArchiveEntry(path);
|
final ZipArchiveEntry entry = new ZipArchiveEntry(path);
|
||||||
if (mode == FileMode.TREE) {
|
if (mode == FileMode.TREE) {
|
||||||
|
|
|
@ -368,7 +368,7 @@ private <T extends Closeable> OutputStream writeArchive(Format<T> fmt) {
|
||||||
mode = FileMode.TREE;
|
mode = FileMode.TREE;
|
||||||
|
|
||||||
if (mode == FileMode.TREE) {
|
if (mode == FileMode.TREE) {
|
||||||
fmt.putEntry(outa, name + "/", mode, null);
|
fmt.putEntry(outa, name + "/", mode, null); //$NON-NLS-1$
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
walk.getObjectId(idBuf, 0);
|
walk.getObjectId(idBuf, 0);
|
||||||
|
|
|
@ -274,8 +274,8 @@ public static final class DeleteTree extends PathEdit {
|
||||||
*/
|
*/
|
||||||
public DeleteTree(final String entryPath) {
|
public DeleteTree(final String entryPath) {
|
||||||
super(
|
super(
|
||||||
(entryPath.endsWith("/") || entryPath.length() == 0) ? entryPath
|
(entryPath.endsWith("/") || entryPath.length() == 0) ? entryPath //$NON-NLS-1$
|
||||||
: entryPath + "/");
|
: entryPath + "/"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public void apply(final DirCacheEntry ent) {
|
public void apply(final DirCacheEntry ent) {
|
||||||
|
|
|
@ -876,8 +876,7 @@ private void addSubmodule(String url, String name, String revision,
|
||||||
private static String findRef(String ref, Repository repo)
|
private static String findRef(String ref, Repository repo)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (!ObjectId.isId(ref)) {
|
if (!ObjectId.isId(ref)) {
|
||||||
Ref r = repo.getRef(
|
Ref r = repo.getRef(Constants.DEFAULT_REMOTE_NAME + "/" + ref); //$NON-NLS-1$
|
||||||
Constants.DEFAULT_REMOTE_NAME + "/" + ref);
|
|
||||||
if (r != null)
|
if (r != null)
|
||||||
return r.getName();
|
return r.getName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ class SftpObjectDB extends WalkRemoteObjectDatabase {
|
||||||
throw err;
|
throw err;
|
||||||
} catch (SftpException je) {
|
} catch (SftpException je) {
|
||||||
throw new TransportException("Can't enter " + path + "/objects"
|
throw new TransportException("Can't enter " + path + "/objects"
|
||||||
+ ": " + je.getMessage(), je);
|
+ ": " + je.getMessage(), je); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ class SftpObjectDB extends WalkRemoteObjectDatabase {
|
||||||
throw err;
|
throw err;
|
||||||
} catch (SftpException je) {
|
} catch (SftpException je) {
|
||||||
throw new TransportException("Can't enter " + p + " from "
|
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 @@ FileStream open(final String path) throws IOException {
|
||||||
} catch (SftpException je) {
|
} catch (SftpException je) {
|
||||||
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
|
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
|
||||||
throw new FileNotFoundException(path);
|
throw new FileNotFoundException(path);
|
||||||
throw new TransportException("Can't get " + objectsPath + "/"
|
throw new TransportException("Can't get " + objectsPath + "/" //$NON-NLS-2$
|
||||||
+ path + ": " + je.getMessage(), je);
|
+ path + ": " + je.getMessage(), je); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ void deleteFile(final String path) throws IOException {
|
||||||
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
|
if (je.id == ChannelSftp.SSH_FX_NO_SUCH_FILE)
|
||||||
return;
|
return;
|
||||||
throw new TransportException("Can't delete " + objectsPath
|
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.
|
// Prune any now empty directories.
|
||||||
|
@ -318,8 +318,8 @@ OutputStream writeFile(final String path,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new TransportException("Can't write " + objectsPath + "/"
|
throw new TransportException("Can't write " + objectsPath + "/" //$NON-NLS-2$
|
||||||
+ path + ": " + je.getMessage(), je);
|
+ path + ": " + je.getMessage(), je); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ void writeFile(final String path, final byte[] data) throws IOException {
|
||||||
ftp.rename(lock, path);
|
ftp.rename(lock, path);
|
||||||
} catch (SftpException je) {
|
} catch (SftpException je) {
|
||||||
throw new TransportException("Can't write " + objectsPath
|
throw new TransportException("Can't write " + objectsPath
|
||||||
+ "/" + path + ": " + je.getMessage(), je);
|
+ "/" + path + ": " + je.getMessage(), je); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
} catch (IOException err) {
|
} catch (IOException err) {
|
||||||
try {
|
try {
|
||||||
|
@ -377,6 +377,7 @@ Map<String, Ref> readAdvertisedRefs() throws TransportException {
|
||||||
return avail;
|
return avail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private void readLooseRefs(final TreeMap<String, Ref> avail,
|
private void readLooseRefs(final TreeMap<String, Ref> avail,
|
||||||
final String dir, final String prefix)
|
final String dir, final String prefix)
|
||||||
throws TransportException {
|
throws TransportException {
|
||||||
|
@ -384,8 +385,8 @@ private void readLooseRefs(final TreeMap<String, Ref> avail,
|
||||||
try {
|
try {
|
||||||
list = ftp.ls(dir);
|
list = ftp.ls(dir);
|
||||||
} catch (SftpException je) {
|
} catch (SftpException je) {
|
||||||
throw new TransportException("Can't ls " + objectsPath + "/"
|
throw new TransportException("Can't ls " + objectsPath + "/" //$NON-NLS-2$
|
||||||
+ dir + ": " + je.getMessage(), je);
|
+ dir + ": " + je.getMessage(), je); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final ChannelSftp.LsEntry ent : list) {
|
for (final ChannelSftp.LsEntry ent : list) {
|
||||||
|
@ -414,8 +415,8 @@ private Ref readRef(final TreeMap<String, Ref> avail,
|
||||||
} catch (FileNotFoundException noRef) {
|
} catch (FileNotFoundException noRef) {
|
||||||
return null;
|
return null;
|
||||||
} catch (IOException err) {
|
} catch (IOException err) {
|
||||||
throw new TransportException("Cannot read " + objectsPath + "/"
|
throw new TransportException("Cannot read " + objectsPath + "/" //$NON-NLS-2$
|
||||||
+ path + ": " + err.getMessage(), err);
|
+ path + ": " + err.getMessage(), err); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line == null)
|
if (line == null)
|
||||||
|
@ -440,7 +441,7 @@ private Ref readRef(final TreeMap<String, Ref> avail,
|
||||||
return r;
|
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) {
|
private Storage loose(final Ref r) {
|
||||||
|
|
|
@ -170,7 +170,7 @@ public static int response(final HttpConnection c) throws IOException {
|
||||||
final String host = c.getURL().getHost();
|
final String host = c.getURL().getHost();
|
||||||
// The standard J2SE error message is not very useful.
|
// 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(MessageFormat.format(JGitText.get().connectionTimeOut, host));
|
||||||
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$
|
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ public static int response(final java.net.HttpURLConnection c)
|
||||||
final String host = c.getURL().getHost();
|
final String host = c.getURL().getHost();
|
||||||
// The standard J2SE error message is not very useful.
|
// 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(
|
throw new ConnectException(MessageFormat.format(
|
||||||
JGitText.get().connectionTimeOut, host));
|
JGitText.get().connectionTimeOut, host));
|
||||||
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$
|
throw new ConnectException(ce.getMessage() + " " + host); //$NON-NLS-1$
|
||||||
|
|
Loading…
Reference in New Issue