Skip to content

Commit

Permalink
Treat TryFailThrowable error prone check as error
Browse files Browse the repository at this point in the history
Enabling the option detected a problem in URLConnectionTest
so this fixes that.

Test: m -j -l32 javac-check-core-tests RUN_ERROR_PRONE=true
run org.apache.harmony.luni.tests.java.net.URLConnectionTest
test using vogar and CTS
Bug: 31507496
Change-Id: Ie3f150e79fc1e58f812bf5c81181a68dae752271
  • Loading branch information
paulduffin committed Oct 4, 2016
1 parent f0d9718 commit 6be83e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions JavaLibrary.mk
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
nist-pkix-tests \
sqlite-jdbc
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_ERROR_PRONE_FLAGS := -Xep:TryFailThrowable:ERROR
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
LOCAL_MODULE := core-tests
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/JavaLibrary.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ public void test_getDoInput() throws IOException {
try {
uc2.getInputStream();
fail();
} catch (Throwable expected) {
} catch (IOException expected) {
}
}

Expand Down

0 comments on commit 6be83e4

Please sign in to comment.