cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CXF-7462) OutboundSseEventImpl could use some minor tweaks
Date Thu, 03 Aug 2017 14:22:00 GMT


ASF GitHub Bot commented on CXF-7462:

Github user andymc12 commented on the issue:
    @reta @sberyozkin I've updated the code again - here is the rough summary of changes:
    1) Default the event's _type_ to be `data.getClass()`
    2) Throw an IllegalArgumentException if `data` is null.  This is consistent with the spec's
`Sse.newEvent(null)` method.
    3) Default the event's _MediaType_ to be `MediaType.TEXT_PLAIN_TYPE` - this avoids NPEs
that I was seeing in the `OutboundSseEventBodyWriter` class.
    4) Tests for all of these cases.  
    I'm going on vacation tomorrow, so hopefully I can get this merged today.  Can you two
give the code one last review?  
    Thanks again!

> OutboundSseEventImpl could use some minor tweaks
> ------------------------------------------------
>                 Key: CXF-7462
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.2.0
>            Reporter: Andy McCright
>            Priority: Minor
>             Fix For: 3.2.0
> The OutboundSseEventImpl class could use some minor tweaks, including:
> 1) Make the fields final to reflect that the event is immutable.
> 2) Use defaults for the data type (String.class) and media type (SERVER_SENT_EVENT_TYPE).
> 3) Restrict the constructor's visibility.
> I also plan to add some tests for these changes.

This message was sent by Atlassian JIRA

View raw message