Skip to content

Commit 3028e0e

Browse files
committed
fixed wrong parameter assignment which caused ut8 violation close to be replaced by normal close code
1 parent 8624440 commit 3028e0e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/java_websocket/exceptions/InvalidDataException.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ public InvalidDataException( int closecode , String s ) {
1919

2020
public InvalidDataException( int closecode , Throwable t ) {
2121
super( t );
22-
if( t instanceof InvalidDataException ) {
23-
this.closecode = ( (InvalidDataException) t ).getCloseCode();
24-
}
22+
this.closecode = closecode;
2523
}
2624

2725
public InvalidDataException( int closecode , String s , Throwable t ) {
2826
super( s, t );
29-
if( t instanceof InvalidDataException ) {
30-
this.closecode = ( (InvalidDataException) t ).getCloseCode();
31-
}
27+
this.closecode = closecode;
3228
}
3329

3430
public int getCloseCode() {

0 commit comments

Comments
 (0)