Fix more compiler warnings
This commit is contained in:
parent
85f8247cef
commit
f1c07dbf0b
@ -103,7 +103,7 @@ public class UniqueName implements Comparable<UniqueName> {
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
return ((Integer) id).compareTo((Integer) other.id);
|
||||
return ((Integer) id).compareTo(other.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,10 +15,11 @@
|
||||
*/
|
||||
package io.netty.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class NetworkConstantsTest {
|
||||
@ -30,7 +31,7 @@ public class NetworkConstantsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoopback() throws UnknownHostException {
|
||||
public void testLoopback() {
|
||||
assertNotNull(NetworkConstants.LOOPBACK_IF);
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,11 @@
|
||||
*/
|
||||
package io.netty.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@ -44,30 +43,30 @@ public class UniqueNameTest {
|
||||
|
||||
@Before
|
||||
public void initializeTest() {
|
||||
this.names = new ConcurrentHashMap<String, Boolean>();
|
||||
names = new ConcurrentHashMap<String, Boolean>();
|
||||
}
|
||||
|
||||
@Test(expected=NullPointerException.class)
|
||||
public void testCannnotProvideNullMap() {
|
||||
UniqueName nullName = new UniqueName(null, "Nothing");
|
||||
new UniqueName(null, "Nothing");
|
||||
}
|
||||
|
||||
@Test(expected=NullPointerException.class)
|
||||
public void testCannotProvideNullName() {
|
||||
UniqueName nullName = new UniqueName(this.names, null);
|
||||
new UniqueName(names, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArgsCanBePassed() {
|
||||
UniqueName nullName = new UniqueName(this.names, "Argh, matey!", 2, 5, new Object());
|
||||
new UniqueName(names, "Argh, matey!", 2, 5, new Object());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegisteringName() {
|
||||
registerName("Abcedrian");
|
||||
|
||||
assertTrue(this.names.get("Abcedrian"));
|
||||
assertTrue(this.names.get("Hellyes") == null);
|
||||
assertTrue(names.get("Abcedrian"));
|
||||
assertTrue(names.get("Hellyes") == null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user