kopia lustrzana https://github.com/gaul/s3proxy
Fix error prone 2.3.2 warnings
rodzic
66ed9fe6ef
commit
43a45e36b6
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue