diff options
author | Eric Gribkoff <ericgribkoff@google.com> | 2018-08-09 09:09:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 09:09:21 -0700 |
commit | 79b24709b9617315a1726686f5c62ec7b2c392a1 (patch) | |
tree | be88ca2160637e2680bb4efcb4153538ccbadca5 /core | |
parent | 67352081f8123d86903a719367a5865b5cc42a93 (diff) | |
download | grpc-grpc-java-79b24709b9617315a1726686f5c62ec7b2c392a1.tar.gz |
all: update animalsniffer to Java 7 and add Android 14 (#4727)
Diffstat (limited to 'core')
-rw-r--r-- | core/BUILD.bazel | 1 | ||||
-rw-r--r-- | core/build.gradle | 6 | ||||
-rw-r--r-- | core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/core/BUILD.bazel b/core/BUILD.bazel index 943b4835a..2cdb351c6 100644 --- a/core/BUILD.bazel +++ b/core/BUILD.bazel @@ -44,6 +44,7 @@ java_library( "@com_google_guava_guava//jar", "@io_opencensus_opencensus_api//jar", "@io_opencensus_opencensus_contrib_grpc_metrics//jar", + "@org_codehaus_mojo_animal_sniffer_annotations//jar", ], ) diff --git a/core/build.gradle b/core/build.gradle index eefeff68f..700592f86 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -5,7 +5,8 @@ dependencies { libraries.gson, libraries.guava, libraries.errorprone, - libraries.jsr305 + libraries.jsr305, + libraries.animalsniffer_annotations compile (libraries.opencensus_api) { // prefer 3.0.0 from libraries instead of 3.0.1 exclude group: 'com.google.code.findbugs', module: 'jsr305' @@ -28,7 +29,8 @@ dependencies { project(':grpc-grpclb'), libraries.guava_testlib - signature "org.codehaus.mojo.signature:java16:1.1@signature" + signature "org.codehaus.mojo.signature:java17:1.0@signature" + signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature" } javadoc { diff --git a/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java b/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java index 0abaa6fc9..998cfe6a9 100644 --- a/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java +++ b/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java @@ -40,6 +40,7 @@ import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; +import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement; /** * {@link JndiResourceResolverFactory} resolves additional records for the DnsNameResolver. @@ -194,6 +195,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol return new SrvRecord(parts[3], Integer.parseInt(parts[2])); } + @IgnoreJRERequirement private static List<String> getAllRecords(String recordType, String name) throws NamingException { String[] rrType = new String[]{recordType}; @@ -235,6 +237,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol return records; } + @IgnoreJRERequirement private static void closeThenThrow(NamingEnumeration<?> namingEnumeration, NamingException e) throws NamingException { try { @@ -245,6 +248,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol throw e; } + @IgnoreJRERequirement private static void closeThenThrow(DirContext ctx, NamingException e) throws NamingException { try { ctx.close(); |