This is an automated email from the ASF dual-hosted git repository.
weihu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 928fe84bf Annotate param for @ParametersAreNonnullByDefault.
new a2300cd1e Merge pull request #3787 from pandaapo/master-issue3723
928fe84bf is described below
commit 928fe84bfc4929919dc41ec2efd1827232de44be
Author: pandaapo <[email protected]>
AuthorDate: Thu Apr 20 21:23:33 2023 +0800
Annotate param for @ParametersAreNonnullByDefault.
---
.../storage/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/src/main/java/org/apache/eventmesh/storage/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
b/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/src/main/java/org/apache/eventmesh/storage/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
index fef86736e..ef9a386a2 100644
---
a/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/src/main/java/org/apache/eventmesh/storage/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
+++
b/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/src/main/java/org/apache/eventmesh/storage/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
@@ -19,6 +19,9 @@ package org.apache.eventmesh.storage.rabbitmq.cloudevent;
import java.nio.charset.StandardCharsets;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
import io.cloudevents.CloudEventData;
import io.cloudevents.SpecVersion;
import io.cloudevents.core.format.EventFormat;
@@ -37,7 +40,7 @@ public class RabbitmqCloudEventWriter
}
@Override
- public RabbitmqCloudEvent setEvent(EventFormat format, byte[] value)
throws CloudEventRWException {
+ public RabbitmqCloudEvent setEvent(@Nullable EventFormat format, @Nonnull
byte[] value) throws CloudEventRWException {
rabbitmqCloudEvent.setData(new String(value, StandardCharsets.UTF_8));
return rabbitmqCloudEvent;
}
@@ -55,7 +58,7 @@ public class RabbitmqCloudEventWriter
}
@Override
- public CloudEventContextWriter withContextAttribute(String name, String
value) throws CloudEventRWException {
+ public CloudEventContextWriter withContextAttribute(@Nonnull String name,
@Nonnull String value) throws CloudEventRWException {
rabbitmqCloudEvent.getExtensions().put(name, value);
return this;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]