Issue Details (XML | Word | Printable)

Key: WEBSOCKET_SPEC-88
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: dannycoward
Reporter: jitu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
websocket-spec

CloseReason changes

Created: 04/Jan/13 12:04 AM   Updated: 14/Feb/13 12:04 AM   Resolved: 14/Feb/13 12:04 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Tags: v013
Participants: dannycoward, jitu and Pavel Bucek


 Description  « Hide

Bunch of changes for CloseReason class

  • Add final modifier for fields
  • UTF-8 encoded bytes for reasonPhrase cannot be greater than 123 bytes. Throw IllegalArgumentException in that case.
  • enum constants for status codes need be documented. Otherwise, javadoc would be empty

Looks like cannot attach the patch. Will send by email.

If a close frame doesn't include status code, the Endpoint#onClose() is invoked with a CloseReason. What would be the value of CloseReason#getCloseCode() return in that case ? Would it be 1005 ? Good to include that in the spec.



Pavel Bucek added a comment - 09/Jan/13 04:13 PM

also please add usable CloseReason.toString() implementation.


dannycoward added a comment - 31/Jan/13 09:55 PM

all updated in v012


Pavel Bucek added a comment - 12/Feb/13 10:10 AM

please add null checks; constructor and toString method can end with throwing NPE.


dannycoward added a comment - 14/Feb/13 12:04 AM

done - thanks !