kopia lustrzana https://github.com/gaul/s3proxy
Add @Nullable annotations where appropriate
Found via error-prone 2.1.0.pull/218/head
rodzic
51aa2e7fcd
commit
f6c3ab9e75
5
pom.xml
5
pom.xml
|
@ -323,6 +323,11 @@
|
|||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>2.8.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -171,6 +172,7 @@ final class AwsSignature {
|
|||
return BaseEncoding.base16().lowerCase().encode(hash);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String[] extractSignedHeaders(String authorization) {
|
||||
int index = authorization.indexOf("SignedHeaders=");
|
||||
if (index < 0) {
|
||||
|
|
|
@ -20,6 +20,8 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.hash.HashCode;
|
||||
|
@ -53,6 +55,7 @@ final class NullBlobStore extends ForwardingBlobStore {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public BlobMetadata blobMetadata(String container, String name) {
|
||||
Blob blob = getBlob(container, name);
|
||||
if (blob == null) {
|
||||
|
@ -62,11 +65,13 @@ final class NullBlobStore extends ForwardingBlobStore {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Blob getBlob(String container, String name) {
|
||||
return getBlob(container, name, GetOptions.NONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Blob getBlob(String container, String name, GetOptions options) {
|
||||
Blob blob = super.getBlob(container, name, options);
|
||||
if (blob == null) {
|
||||
|
|
|
@ -46,6 +46,7 @@ import java.util.TreeMap;
|
|||
import java.util.TreeSet;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -212,6 +213,7 @@ public class S3ProxyHandler {
|
|||
if (authenticationType != AuthenticationType.NONE) {
|
||||
anonymousIdentity = false;
|
||||
blobStoreLocator = new BlobStoreLocator() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Map.Entry<String, BlobStore> locateBlobStore(
|
||||
String identityArg, String container, String blob) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.Map;
|
|||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
@ -1381,6 +1382,7 @@ public final class AwsSdkTest {
|
|||
private static final class NullX509TrustManager
|
||||
implements X509TrustManager {
|
||||
@Override
|
||||
@Nullable
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return null;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue