Skip to content

Commit

Permalink
[java] NullAway added
Browse files Browse the repository at this point in the history
  • Loading branch information
mk868 committed Aug 21, 2024
1 parent e4258ea commit c18748d
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 2 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ maven.install(
"com.google.googlejavaformat:google-java-format:jar:1.22.0",
"com.graphql-java:graphql-java:20.2",
"com.graphql-java:java-dataloader:3.2.0",
"com.uber.nullaway:nullaway:0.11.2",
"dev.failsafe:failsafe:3.3.2",
"io.grpc:grpc-context:1.65.1",
"io.lettuce:lettuce-core:6.3.2.RELEASE",
Expand Down
10 changes: 10 additions & 0 deletions java/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ java_plugin(
],
)

java_plugin(
name = "nullaway",
visibility = [
"//java:__subpackages__",
],
deps = [
artifact("com.uber.nullaway:nullaway"),
]
)

java_library(
name = "auto-service",
exported_plugins = [
Expand Down
118 changes: 116 additions & 2 deletions java/maven_install.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": -1798640815,
"__RESOLVED_ARTIFACTS_HASH": 890286156,
"__INPUT_ARTIFACTS_HASH": -264671864,
"__RESOLVED_ARTIFACTS_HASH": -1952847522,
"conflict_resolution": {
"com.google.code.gson:gson:2.8.9": "com.google.code.gson:gson:2.11.0",
"com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.27.0",
Expand Down Expand Up @@ -206,6 +206,13 @@
},
"version": "3.2.0"
},
"com.uber.nullaway:nullaway": {
"shasums": {
"jar": "7a1e6747500c90b005ae57670af6e3e9213f141e3321bae3fec82ca60e04b49a",
"sources": "b3ecb5ad95fa9f18df754e8d6c09edf743de0a01773b103b56ee5f8cc3bcebf6"
},
"version": "0.11.2"
},
"commons-codec:commons-codec": {
"shasums": {
"jar": "b3e9f6d63a790109bf0d056611fbed1cf69055826defeb9894a71369d246ed63",
Expand Down Expand Up @@ -619,6 +626,13 @@
},
"version": "3.42.0"
},
"org.checkerframework:dataflow-nullaway": {
"shasums": {
"jar": "5575726419747f9681cdefae507013dbdfefbd0a28dff553be46cdd814756e49",
"sources": "49e6aed68eb1b29d850ea5e7221fed0eda56eb363935bdeee5c7b8488f35375a"
},
"version": "3.43.0"
},
"org.dom4j:dom4j": {
"shasums": {
"jar": "235a9167a8a199be04b5326d92927ca0adeb90d11f69fe2e821b34ce8433b591",
Expand Down Expand Up @@ -906,6 +920,11 @@
"com.graphql-java:java-dataloader": [
"org.slf4j:slf4j-api"
],
"com.uber.nullaway:nullaway": [
"com.google.guava:guava",
"org.checkerframework:dataflow-nullaway",
"org.jspecify:jspecify"
],
"io.grpc:grpc-context": [
"io.grpc:grpc-api"
],
Expand Down Expand Up @@ -1486,6 +1505,23 @@
"org.dataloader.stats",
"org.dataloader.stats.context"
],
"com.uber.nullaway:nullaway": [
"com.uber.nullaway",
"com.uber.nullaway.annotations",
"com.uber.nullaway.dataflow",
"com.uber.nullaway.dataflow.cfg",
"com.uber.nullaway.fixserialization",
"com.uber.nullaway.fixserialization.adapters",
"com.uber.nullaway.fixserialization.location",
"com.uber.nullaway.fixserialization.out",
"com.uber.nullaway.generics",
"com.uber.nullaway.handlers",
"com.uber.nullaway.handlers.contract",
"com.uber.nullaway.handlers.contract.fieldcontract",
"com.uber.nullaway.handlers.stream",
"com.uber.nullaway.handlers.temporary",
"com.uber.nullaway.jarinfer"
],
"commons-codec:commons-codec": [
"org.apache.commons.codec",
"org.apache.commons.codec.binary",
Expand Down Expand Up @@ -2546,6 +2582,80 @@
"org.checkerframework.dataflow.qual",
"org.checkerframework.framework.qual"
],
"org.checkerframework:dataflow-nullaway": [
"javax.annotation",
"javax.annotation.concurrent",
"javax.annotation.meta",
"org.checkerframework.dataflow.qual",
"org.checkerframework.nullaway.checker.builder.qual",
"org.checkerframework.nullaway.checker.calledmethods.qual",
"org.checkerframework.nullaway.checker.compilermsgs.qual",
"org.checkerframework.nullaway.checker.fenum.qual",
"org.checkerframework.nullaway.checker.formatter.qual",
"org.checkerframework.nullaway.checker.guieffect.qual",
"org.checkerframework.nullaway.checker.i18n.qual",
"org.checkerframework.nullaway.checker.i18nformatter.qual",
"org.checkerframework.nullaway.checker.index.qual",
"org.checkerframework.nullaway.checker.initialization.qual",
"org.checkerframework.nullaway.checker.interning.qual",
"org.checkerframework.nullaway.checker.lock.qual",
"org.checkerframework.nullaway.checker.mustcall.qual",
"org.checkerframework.nullaway.checker.nullness.qual",
"org.checkerframework.nullaway.checker.optional.qual",
"org.checkerframework.nullaway.checker.propkey.qual",
"org.checkerframework.nullaway.checker.regex.qual",
"org.checkerframework.nullaway.checker.signature.qual",
"org.checkerframework.nullaway.checker.signedness.qual",
"org.checkerframework.nullaway.checker.tainting.qual",
"org.checkerframework.nullaway.checker.units.qual",
"org.checkerframework.nullaway.com.google.common.annotations",
"org.checkerframework.nullaway.com.google.common.base",
"org.checkerframework.nullaway.com.google.common.base.internal",
"org.checkerframework.nullaway.com.google.common.cache",
"org.checkerframework.nullaway.com.google.common.collect",
"org.checkerframework.nullaway.com.google.common.escape",
"org.checkerframework.nullaway.com.google.common.eventbus",
"org.checkerframework.nullaway.com.google.common.graph",
"org.checkerframework.nullaway.com.google.common.hash",
"org.checkerframework.nullaway.com.google.common.html",
"org.checkerframework.nullaway.com.google.common.io",
"org.checkerframework.nullaway.com.google.common.math",
"org.checkerframework.nullaway.com.google.common.net",
"org.checkerframework.nullaway.com.google.common.primitives",
"org.checkerframework.nullaway.com.google.common.reflect",
"org.checkerframework.nullaway.com.google.common.util.concurrent",
"org.checkerframework.nullaway.com.google.common.util.concurrent.internal",
"org.checkerframework.nullaway.com.google.common.xml",
"org.checkerframework.nullaway.com.google.errorprone.annotations",
"org.checkerframework.nullaway.com.google.errorprone.annotations.concurrent",
"org.checkerframework.nullaway.com.google.j2objc.annotations",
"org.checkerframework.nullaway.com.google.thirdparty.publicsuffix",
"org.checkerframework.nullaway.common.aliasing.qual",
"org.checkerframework.nullaway.common.initializedfields.qual",
"org.checkerframework.nullaway.common.reflection.qual",
"org.checkerframework.nullaway.common.returnsreceiver.qual",
"org.checkerframework.nullaway.common.subtyping.qual",
"org.checkerframework.nullaway.common.util.count.report.qual",
"org.checkerframework.nullaway.common.value.qual",
"org.checkerframework.nullaway.dataflow.analysis",
"org.checkerframework.nullaway.dataflow.busyexpr",
"org.checkerframework.nullaway.dataflow.cfg",
"org.checkerframework.nullaway.dataflow.cfg.block",
"org.checkerframework.nullaway.dataflow.cfg.builder",
"org.checkerframework.nullaway.dataflow.cfg.node",
"org.checkerframework.nullaway.dataflow.cfg.playground",
"org.checkerframework.nullaway.dataflow.cfg.visualize",
"org.checkerframework.nullaway.dataflow.constantpropagation",
"org.checkerframework.nullaway.dataflow.expression",
"org.checkerframework.nullaway.dataflow.livevariable",
"org.checkerframework.nullaway.dataflow.reachingdef",
"org.checkerframework.nullaway.dataflow.util",
"org.checkerframework.nullaway.framework.qual",
"org.checkerframework.nullaway.javacutil",
"org.checkerframework.nullaway.javacutil.trees",
"org.checkerframework.nullaway.org.plumelib.reflection",
"org.checkerframework.nullaway.org.plumelib.util"
],
"org.dom4j:dom4j": [
"org.dom4j",
"org.dom4j.bean",
Expand Down Expand Up @@ -3016,6 +3126,8 @@
"com.graphql-java:graphql-java:jar:sources",
"com.graphql-java:java-dataloader",
"com.graphql-java:java-dataloader:jar:sources",
"com.uber.nullaway:nullaway",
"com.uber.nullaway:nullaway:jar:sources",
"commons-codec:commons-codec",
"commons-codec:commons-codec:jar:sources",
"commons-io:commons-io",
Expand Down Expand Up @@ -3134,6 +3246,8 @@
"org.bouncycastle:bcutil-jdk18on:jar:sources",
"org.checkerframework:checker-qual",
"org.checkerframework:checker-qual:jar:sources",
"org.checkerframework:dataflow-nullaway",
"org.checkerframework:dataflow-nullaway:jar:sources",
"org.dom4j:dom4j",
"org.dom4j:dom4j:jar:sources",
"org.eclipse.mylyn.github:org.eclipse.egit.github.core",
Expand Down
8 changes: 8 additions & 0 deletions java/src/org/openqa/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ java_export(
":manifest",
artifact("org.jspecify:jspecify"),
],
plugins = [
"//java:nullaway"
],
javacopts = [
'-Xep:NullAway:WARN',
'-XepOpt:NullAway:AnnotatedPackages=org.openqa.selenium',
'-XepOpt:NullAway:JSpecifyMode=true'
],
)

java_export(
Expand Down
16 changes: 16 additions & 0 deletions java/src/org/openqa/selenium/support/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ java_export(
"//java/src/org/openqa/selenium/support/ui:elements",
"//java/src/org/openqa/selenium/support/ui:wait",
],
plugins = [
"//java:nullaway"
],
javacopts = [
'-Xep:NullAway:WARN',
'-XepOpt:NullAway:AnnotatedPackages=org.openqa.selenium',
'-XepOpt:NullAway:JSpecifyMode=true'
],
)

java_library(
Expand All @@ -58,4 +66,12 @@ java_library(
"//java/src/org/openqa/selenium:core",
"//java/src/org/openqa/selenium/support/ui:components",
],
plugins = [
"//java:nullaway"
],
javacopts = [
'-Xep:NullAway:WARN',
'-XepOpt:NullAway:AnnotatedPackages=org.openqa.selenium',
'-XepOpt:NullAway:JSpecifyMode=true'
],
)

0 comments on commit c18748d

Please sign in to comment.