// 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) {
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) {
throw err;
} catch (SftpException je) {
throw new TransportException("Can't enter " + path + "/objects"
- + ": " + je.getMessage(), je);
+ + ": " + je.getMessage(), je); //$NON-NLS-1$
}
}
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$
}
}
} 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$
}
}
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.
}
}
- 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$
}
}
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 {
return avail;
}
+ @SuppressWarnings("unchecked")
private void readLooseRefs(final TreeMap<String, Ref> avail,
final String dir, final String prefix)
throws TransportException {
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) {
} 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)
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) {
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$
}
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$