Fix error prone 2.3.2 warnings

pull/293/head
Andrew Gaul 2019-02-05 15:33:46 -08:00
rodzic 66ed9fe6ef
commit 43a45e36b6
2 zmienionych plików z 5 dodań i 7 usunięć

Wyświetl plik

@ -730,8 +730,7 @@ public class S3ProxyHandler {
return;
}
case "OPTIONS":
handleOptionsBlob(request, response, blobStore, path[1],
path[2]);
handleOptionsBlob(request, response, blobStore, path[1]);
return;
default:
break;
@ -825,8 +824,7 @@ public class S3ProxyHandler {
if (access == ContainerAccess.PRIVATE) {
throw new S3Exception(S3ErrorCode.ACCESS_DENIED);
}
handleOptionsBlob(request, response, blobStore, containerName,
"");
handleOptionsBlob(request, response, blobStore, containerName);
return;
}
default:
@ -1551,8 +1549,8 @@ public class S3ProxyHandler {
private void handleOptionsBlob(HttpServletRequest request,
HttpServletResponse response,
BlobStore blobStore, String containerName,
String blobName) throws IOException, S3Exception {
BlobStore blobStore,
String containerName) throws IOException, S3Exception {
if (!blobStore.containerExists(containerName)) {
// Don't leak internal information, although authenticated
throw new S3Exception(S3ErrorCode.ACCESS_DENIED);

Wyświetl plik

@ -79,7 +79,6 @@ public final class CrossOriginResourceSharingResponseTest {
private EndpointConfiguration s3EndpointConfig;
private S3Proxy s3Proxy;
private BlobStoreContext context;
private String blobStoreType;
private String containerName;
private AWSCredentials awsCreds;
private AmazonS3 s3Client;
@ -345,6 +344,7 @@ public final class CrossOriginResourceSharingResponseTest {
// Relax SSL Certificate check
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(
null, new TrustStrategy() {
@Override
public boolean isTrusted(X509Certificate[] arg0,
String arg1) throws CertificateException {
return true;