aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-02-17 16:07:59 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2023-02-17 16:07:59 +0100
commitd01cbe25a8e0d7fa4b7c9783ff5518d277519342 (patch)
tree5556ff533b2204ac91e60e82a98c28abf1cb9a8b
parent4c3b13e7713abc527181b921ff256595fd9c2eb6 (diff)
Minor cleanup
-rw-r--r--vespalog/src/test/java/com/yahoo/log/VespaLevelControllerRepoTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/vespalog/src/test/java/com/yahoo/log/VespaLevelControllerRepoTest.java b/vespalog/src/test/java/com/yahoo/log/VespaLevelControllerRepoTest.java
index 83db5a027a4..1086b99d557 100644
--- a/vespalog/src/test/java/com/yahoo/log/VespaLevelControllerRepoTest.java
+++ b/vespalog/src/test/java/com/yahoo/log/VespaLevelControllerRepoTest.java
@@ -2,23 +2,24 @@
package com.yahoo.log;
import org.junit.Test;
-import org.junit.Ignore;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
+import java.nio.charset.StandardCharsets;
import java.util.logging.Level;
import java.util.logging.Logger;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
/**
* @author Ulf Lilleengen
* @since 5.1
*/
-@SuppressWarnings({"deprecation", "removal"})
+@SuppressWarnings({"deprecation"})
public class VespaLevelControllerRepoTest {
static int findControlString(RandomAccessFile f, String s) {
@@ -28,7 +29,7 @@ public class VespaLevelControllerRepoTest {
f.seek(0);
f.read(contents);
f.seek(0);
- String c_as_s = new String(contents, "US-ASCII");
+ String c_as_s = new String(contents, StandardCharsets.US_ASCII);
int off = c_as_s.indexOf(toFind);
if (off < 0) {
System.err.println("did not find control line for level '"+s+"' in logcontrol file:");
@@ -49,8 +50,7 @@ public class VespaLevelControllerRepoTest {
try {
lcf.delete();
Logger.getLogger("com.yahoo.log.test").setLevel(null);
- assertEquals(null,
- Logger.getLogger("com.yahoo.log.test").getLevel());
+ assertNull(Logger.getLogger("com.yahoo.log.test").getLevel());
LevelControllerRepo repo = new VespaLevelControllerRepo(lcf.getName(), "all -debug -spam", "TST");