DATAREDIS-1212 - Polishing.
Remove overly pessimistic null checks. Use constant when channel/body are empty to avoid allocations. Remove superfluous final keywords. Original pull request: #559.
This commit is contained in:
@@ -31,7 +31,6 @@ public class BinaryKeyspaceIdentifierUnitTests {
|
||||
@Test // DATAREDIS-744
|
||||
public void shouldReturnIfKeyIsValid() {
|
||||
|
||||
assertThat(BinaryKeyspaceIdentifier.isValid(null)).isFalse();
|
||||
assertThat(BinaryKeyspaceIdentifier.isValid("foo".getBytes())).isFalse();
|
||||
assertThat(BinaryKeyspaceIdentifier.isValid("".getBytes())).isFalse();
|
||||
assertThat(BinaryKeyspaceIdentifier.isValid("foo:bar".getBytes())).isTrue();
|
||||
|
||||
@@ -64,14 +64,6 @@ public class KeyExpirationEventMessageListenerUnitTests {
|
||||
assertThat((byte[]) captor.getValue().getSource()).isEqualTo(MESSAGE_BODY.getBytes());
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-425
|
||||
public void handleMessageShouldNotRespondToNullMessage() {
|
||||
|
||||
listener.onMessage(null, "*".getBytes());
|
||||
|
||||
verifyZeroInteractions(publisherMock);
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-425, DATAREDIS-692
|
||||
public void handleMessageShouldNotRespondToEmptyMessage() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user