Skip to content

Commit

Permalink
Merge pull request eclipse#72 from matzew/Ce_ignore_payload
Browse files Browse the repository at this point in the history
Adding JsonIgnore for payload property
  • Loading branch information
cescoffier authored Mar 19, 2019
2 parents 98426b6 + 22c9185 commit 7a3b4cb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.smallrye.reactive.messaging.cloudevents;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.cloudevents.CloudEvent;
import io.cloudevents.Extension;

Expand Down Expand Up @@ -61,7 +62,13 @@ public Optional<List<Extension>> getExtensions() {
}

@Override
@JsonIgnore
public T getPayload() {
return delegate.getData().orElseThrow(() -> new IllegalArgumentException("Invalid message - no payload"));
}

@Override
public String toString() {
return delegate.toString();
}
}

0 comments on commit 7a3b4cb

Please sign in to comment.