1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-06 13:11:08 +01:00

Update errorprone(-plugin) and make Unused(Variable|Method) an error

This commit is contained in:
Florian Schmaus 2019-05-07 22:58:02 +02:00
parent 68d7d738b6
commit 7f0dc72dab
46 changed files with 81 additions and 126 deletions

View file

@ -51,6 +51,7 @@ public class MemoryLeakTestUtil {
private static final Logger LOGGER = Logger.getLogger(MemoryLeakTestUtil.class.getName());
@SuppressWarnings("UnusedVariable")
public static <M extends Manager> void noResourceLeakTest(Function<DummyConnection, M> managerSupplier)
throws XmppStringprepException, IllegalArgumentException, InterruptedException {
final int numConnections = 10;
@ -119,6 +120,7 @@ public class MemoryLeakTestUtil {
assertNull(reference);
}
@SuppressWarnings("UnusedVariable")
private static void triggerGarbageCollection() {
Object object = new Object();
WeakReference<Object> weakReference = new WeakReference<>(object);

View file

@ -31,11 +31,9 @@ import org.junit.Test;
public class StringUtilsTest {
@Test
public void testEscapeForXml() {
String input = null;
assertNull(StringUtils.escapeForXml(null));
input = "<b>";
String input = "<b>";
assertCharSequenceEquals("&lt;b&gt;", StringUtils.escapeForXml(input));
input = "\"";