Fix some orphaned format strings

These lack values to format with.  Found via error-prone 2.3.0.
This commit is contained in:
Andrew Gaul 2018-04-19 08:41:16 -07:00
parent 3d188324d5
commit 46a9f574e2
4 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ public class FilesystemBlobKeyValidatorImpl extends FilesystemBlobKeyValidator {
//blobkey cannot start with / (or \ in Windows) character
if (name.startsWith("\\") || name.startsWith("/"))
throw new IllegalArgumentException("Blob key '%s' cannot start with \\ or /");
throw new IllegalArgumentException("Blob key '" + name + "' cannot start with \\ or /");
}
}

View File

@ -37,7 +37,7 @@ public class FilesystemContainerNameValidatorImpl extends FilesystemContainerNam
//container name cannot contains / (or \ in Windows) character
if (name.contains("\\") || name.contains("/"))
throw new IllegalArgumentException("Container name '%s' cannot contain \\ or /");
throw new IllegalArgumentException("Container name '" + name + "' cannot contain \\ or /");
}
}

View File

@ -79,8 +79,8 @@ public class JschSshClientTest {
public void testExceptionClassesRetry() {
assert ssh.shouldRetry(new JSchException("io error", new IOException("socket closed")));
assert ssh.shouldRetry(new JSchException("connect error", new ConnectException("problem")));
assert ssh.shouldRetry(new IOException("channel %s is not open", new NullPointerException()));
assert ssh.shouldRetry(new IOException("channel %s is not open", new NullPointerException(null)));
assert ssh.shouldRetry(new IOException("channel is not open", new NullPointerException()));
assert ssh.shouldRetry(new IOException("channel is not open", new NullPointerException(null)));
}
public void testOnlyRetryAuthWhenSet() throws UnknownHostException {

View File

@ -109,7 +109,7 @@ public class SshjSshClientTest {
assert ssh.shouldRetry(new TransportException("socket closed"));
assert ssh.shouldRetry(new ConnectionException("problem"));
assert ssh.shouldRetry(new ConnectException("Connection refused"));
assert !ssh.shouldRetry(new IOException("channel %s is not open", new NullPointerException()));
assert !ssh.shouldRetry(new IOException("channel is not open", new NullPointerException()));
}
public void testOnlyRetryAuthWhenSet() {