Github user andymc12 commented on a diff in the pull request:

    https://github.com/apache/cxf/pull/301#discussion_r130927024
  
    --- Diff: 
rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/OutboundSseEventImpl.java ---
    @@ -92,6 +92,7 @@ public Builder data(GenericType newType, Object newData) {
     
             @Override
             public Builder data(Object newData) {
    +            this.type = newData.getClass();
    --- End diff --
    
    Good catch!  Do you have any thoughts on what we should do if a null is 
passed in?  The spec throws an `IllegalArgumentException` if the user passes 
null to `sse.newEvent(String data)`.  For `builder.data(null)`, we could either 
do the same, or take null as the data and use Object.class as the default type. 
 I'm leaning toward throwing the exception.  What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to