diff options
author | gjoranv <gv@verizonmedia.com> | 2022-03-31 23:56:58 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-04-01 00:05:37 +0200 |
commit | df2fa80f10ee2f9516330a58de2abe2f206b5387 (patch) | |
tree | 3ceca61730853ec2400708c8fb0e54e7941d1f57 /vespajlib | |
parent | ffade9acb7b44f15104367aa69301bea05b6f252 (diff) |
Suppress "removal" warnings for java.lang.SecurityManager
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java | 1 | ||||
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java b/vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java index 1779179efcd..a2478046a9e 100644 --- a/vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java +++ b/vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java @@ -36,6 +36,7 @@ public class ThreadFactoryFactory { final String namePrefix; final boolean isDaemon; + @SuppressWarnings("removal") Factory(final String name, boolean isDaemon) { this.isDaemon = isDaemon; final SecurityManager s = System.getSecurityManager(); diff --git a/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java b/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java index 1999323af6b..dab91b6a995 100644 --- a/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java @@ -12,9 +12,10 @@ import org.junit.Test; /** * Just to remove noise from the coverage report. * - * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a> + * @author Steinar Knutsen */ public class FatalErrorHandlerTestCase { + @SuppressWarnings("removal") private static final class AvoidExiting extends SecurityManager { @Override @@ -31,12 +32,14 @@ public class FatalErrorHandlerTestCase { private FatalErrorHandler h; @Before + @SuppressWarnings("removal") public void setUp() throws Exception { h = new FatalErrorHandler(); System.setSecurityManager(new AvoidExiting()); } @After + @SuppressWarnings("removal") public void tearDown() throws Exception { System.setSecurityManager(null); } |