File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
main/java/org/java_websocket/framing
test/java/org/java_websocket/framing Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ public String toString() {
235235 @ Override
236236 public void isValid () throws InvalidDataException {
237237 super .isValid ();
238- if (code == CloseFrame .NO_UTF8 && reason == null ) {
238+ if (code == CloseFrame .NO_UTF8 && reason . isEmpty () ) {
239239 throw new InvalidDataException ( CloseFrame .NO_UTF8 , "Received text is no valid utf8 string!" );
240240 }
241241 if (code == CloseFrame .NOCODE && 0 < reason .length ()) {
Original file line number Diff line number Diff line change @@ -138,12 +138,6 @@ public void testIsValid() {
138138 } catch (InvalidDataException e ) {
139139 //fine
140140 }
141- frame .setCode (CloseFrame .NO_UTF8 );
142- try {
143- frame .isValid ();
144- } catch (InvalidDataException e ) {
145- fail ("InvalidDataException should not be thrown" );
146- }
147141 frame .setCode (CloseFrame .POLICY_VALIDATION );
148142 try {
149143 frame .isValid ();
You can’t perform that action at this time.
0 commit comments