From c366c50d09f9427530f3ce66ef878051a4d3c464 Mon Sep 17 00:00:00 2001 From: cgoldfeder Date: Wed, 1 Feb 2017 11:10:43 -0800 Subject: [PATCH] Suppress a warning in a test In general we insist that you assign the return of checkRegistrarConsoleLogin to something, since it's annotated with @CheckReturnValue, but in this specific test which should always throw the value is unused, so suppress the "unused" warning. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146265522 --- .../google/registry/ui/server/registrar/SessionUtilsTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/javatests/google/registry/ui/server/registrar/SessionUtilsTest.java b/javatests/google/registry/ui/server/registrar/SessionUtilsTest.java index 56e4dcd89..24b6ef008 100644 --- a/javatests/google/registry/ui/server/registrar/SessionUtilsTest.java +++ b/javatests/google/registry/ui/server/registrar/SessionUtilsTest.java @@ -112,8 +112,10 @@ public class SessionUtilsTest { } @Test - public void testCheckRegistrarConsoleLogin_notLoggedIn_throwsIse() throws Exception { + public void testCheckRegistrarConsoleLogin_notLoggedIn_throwsIllegalStateException() + throws Exception { thrown.expect(IllegalStateException.class); + @SuppressWarnings("unused") boolean unused = sessionUtils.checkRegistrarConsoleLogin(req); }