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

    https://github.com/apache/storm/pull/1985#discussion_r104280244
  
    --- Diff: 
external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/spout/StringEventDataScheme.java
 ---
    @@ -46,19 +39,11 @@
       private static final long serialVersionUID = 1L;
     
       @Override
    -  public List<Object> deserialize(Message message) {
    +  public List<Object> deserialize(EventData eventData) {
         final List<Object> fieldContents = new ArrayList<Object>();
    -
    -    for (Section section : message.getPayload()) {
    -      if (section instanceof Data) {
    -        Data data = (Data) section;
    -        fieldContents.add(new String(data.getValue().getArray()));
    -      } else if (section instanceof AmqpValue) {
    -        AmqpValue amqpValue = (AmqpValue) section;
    -        fieldContents.add(amqpValue.getValue().toString());
    -      }
    -    }
    -    
    +    String messageData = "";
    +    messageData = new String 
(eventData.getBody(),eventData.getBodyOffset(),eventData.getBodyLength(),Charset.defaultCharset());
    --- End diff --
    
    Add null check for getbody()


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to