Fix inspect code warnings

This commit is contained in:
Fredrik Fornwall
2015-11-29 01:55:41 +01:00
parent 2a6a3b76b7
commit 74dca95101
2 changed files with 4 additions and 3 deletions

View File

@@ -2,13 +2,14 @@ package com.termux.app;
import junit.framework.TestCase;
import java.util.Collections;
import java.util.LinkedHashSet;
public class TermuxActivityTest extends TestCase {
private void assertUrlsAre(String text, String... urls) {
LinkedHashSet<String> expected = new LinkedHashSet<>();
for (String url : urls) expected.add(url);
Collections.addAll(expected, urls);
assertEquals(expected, TermuxActivity.extractUrls(text));
}

View File

@@ -18,7 +18,7 @@ import com.termux.terminal.TerminalOutput;
public abstract class TerminalTestCase extends TestCase {
public static class MockTerminalOutput extends TerminalOutput {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
public final List<ChangedTitle> titleChanges = new ArrayList<>();
public final List<String> clipboardPuts = new ArrayList<>();
public int bellsRung = 0;
@@ -117,7 +117,7 @@ public abstract class TerminalTestCase extends TestCase {
}
private static final class LineWrapper {
TerminalRow mLine;
final TerminalRow mLine;
public LineWrapper(TerminalRow line) {
mLine = line;