Disable DoNotCall and AlwaysThrows
These errorprone checks check that you don't
call certain functions that always throw exceptions.
These tests want to test such functions, so disable
the checks.
Bug: 190944875
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I1f9ef22ad59bf3bc853bce5b1580f6585e566d19
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 8490ded..f9fe0e2 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -655,6 +655,7 @@
javacflags: [
"-Xep:TryFailThrowable:ERROR",
"-Xep:ComparisonOutOfRange:ERROR",
+ "-Xep:DoNotCall:OFF",
],
},
@@ -742,6 +743,13 @@
// deleting those tests or moving them to a different
// package.
patch_module: "java.base",
+
+ errorprone: {
+ javacflags: [
+ "-Xep:AlwaysThrows:OFF",
+ "-Xep:DoNotCall:OFF",
+ ],
+ },
}
// Builds the core-ojtests-public library. Excludes any private API tests.
@@ -788,6 +796,13 @@
"okhttp",
"testng",
],
+
+ errorprone: {
+ javacflags: [
+ "-Xep:AlwaysThrows:OFF",
+ "-Xep:DoNotCall:OFF",
+ ],
+ },
}
// Exports annotated stubs source files in ojluni/annotations/sdk to make them