Permalink
Browse files

Fix assertions (#396)

  • Loading branch information...
jspricke authored and oakkitten committed Oct 3, 2018
1 parent 8ddbafb commit 4aad7436aed45b5ad21f74283fdd84f76ee42599
@@ -93,7 +93,8 @@
final private static ConcurrentHashMap<String, RelayMessageHandler> handlers = new ConcurrentHashMap<>();
@AnyThread private static void addMessageHandler(String id, RelayMessageHandler handler) {
Assert.assertNull(handlers.put(id, handler));
RelayMessageHandler h = handlers.put(id, handler);
Assert.assertNull(h);
}
@AnyThread private static void removeMessageHandler(String id, RelayMessageHandler handler) {
@@ -71,7 +71,7 @@ boolean ready() {
////////////////////////////////////////////////////////////////////////////////////////////////
@WorkerThread void addFirst(Line line) {
assertEquals(status, STATUS.FETCHING);
assertEquals(STATUS.FETCHING, status);
ensureSizeBeforeAddition();
unfiltered.addFirst(line);
if (line.visible) filtered.addFirst(line);
@@ -103,7 +103,7 @@ public void testGetStringNull() {
bb.putInt(-1);
Data d = new Data(bb.array());
String s = d.getString();
assertEquals(null, s);
assertNull(s);
}
@Test
@@ -139,7 +139,7 @@ public void testGetBufferNull() {
bb.putInt(-1);
Data d = new Data(bb.array());
byte[] b = d.getBuffer();
assertEquals(null, b);
assertNull(b);
}
@@ -160,7 +160,7 @@ public void testGetPointer() throws UnsupportedEncodingException {
Data d = new Data(bb.array());
String p = d.getPointer();
assertEquals(p, "0x" + test);
assertEquals("0x" + test, p);
}
}

0 comments on commit 4aad743

Please sign in to comment.