summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-03-31 23:56:58 +0200
committergjoranv <gv@verizonmedia.com>2022-04-01 00:05:37 +0200
commitdf2fa80f10ee2f9516330a58de2abe2f206b5387 (patch)
tree3ceca61730853ec2400708c8fb0e54e7941d1f57 /vespajlib
parentffade9acb7b44f15104367aa69301bea05b6f252 (diff)
Suppress "removal" warnings for java.lang.SecurityManager
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/main/java/com/yahoo/concurrent/ThreadFactoryFactory.java1
-rw-r--r--vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java5
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);
}