File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
main/java/com/pusher/client/connection
test/java/com/pusher/client/connection Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 11package com .pusher .client .connection ;
22
3+ import java .util .logging .Logger ;
4+
35/**
46 * Represents a change in connection state.
57 */
68public class ConnectionStateChange {
79
10+ private static final Logger log = Logger .getLogger (ConnectionStateChange .class .getName ());
811 private final ConnectionState previousState ;
912 private final ConnectionState currentState ;
1013
@@ -18,9 +21,8 @@ public class ConnectionStateChange {
1821 public ConnectionStateChange (final ConnectionState previousState , final ConnectionState currentState ) {
1922
2023 if (previousState == currentState ) {
21- throw new IllegalArgumentException (
22- "Attempted to create an connection state update where both previous and current state are: "
23- + currentState );
24+ log .fine ("Attempted to create an connection state update where both previous and current state are: "
25+ + currentState );
2426 }
2527
2628 this .previousState = previousState ;
Original file line number Diff line number Diff line change @@ -20,11 +20,6 @@ public void testGetters() {
2020 assertSame (current , change .getCurrentState ());
2121 }
2222
23- @ Test (expected = IllegalArgumentException .class )
24- public void testFailFastIfPreviousStateIsSameAsCurrentState () {
25- new ConnectionStateChange (ConnectionState .CONNECTED , ConnectionState .CONNECTED );
26- }
27-
2823 @ Test
2924 public void testHashCodeAndEquals () {
3025 final ConnectionStateChange instanceOne = new ConnectionStateChange (ConnectionState .DISCONNECTED ,
You can’t perform that action at this time.
0 commit comments