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:
parent
68d7d738b6
commit
7f0dc72dab
46 changed files with 81 additions and 126 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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("<b>", StringUtils.escapeForXml(input));
|
||||
|
||||
input = "\"";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue