Skip to content

Commit 24d108f

Browse files
author
Dave Syer
authored
Improve CloudEventHeaderUtils with narrower scoped method (#318)
Signed-off-by: Dave Syer <[email protected]>
1 parent f5d9b47 commit 24d108f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring/src/main/java/io/cloudevents/spring/messaging/CloudEventHeaderUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ public static CloudEventContext fromMap(Map<String, Object> headers) {
5151
}
5252

5353
/**
54-
* Helper method for extracting {@link MessageHeaders} from a {@link CloudEvent}. The
55-
* result will contain headers canonicalized with a "ce-" prefix, analogous to the
56-
* "binary" message format in Cloud Events.
57-
* @param event the input {@link CloudEvent}
54+
* Helper method for extracting {@link MessageHeaders} from a
55+
* {@link CloudEventContext}. The result will contain headers canonicalized with a
56+
* "ce-" prefix, analogous to the "binary" message format in Cloud Events.
57+
* @param event the input {@link CloudEventContext}
5858
* @return the response headers represented by the event
5959
*/
60-
public static Map<String, Object> toMap(CloudEvent event) {
60+
public static Map<String, Object> toMap(CloudEventContext event) {
6161
Map<String, Object> headers = new HashMap<>();
6262
// Probably this should be done in CloudEventContextReaderAdapter
6363
headers.put(CE_PREFIX + "specversion", event.getSpecVersion().toString());

0 commit comments

Comments
 (0)