Skip to content

Commit

Permalink
Fix method name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Apr 19, 2024
1 parent 35f553d commit c212ae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public Bundle(Map<String, String> attributes, Object message) {
/**
* Get the actual send bytes for this bundle, either from raw payload or message object.
*/
public byte[] getSendBytes() {
public byte[] sendBytes() {
checkState(message != null || payload != null, "no message or payload");
checkState(message == null || payload == null, "both message and payload");
return ofNullable(message).map(JsonUtil::stringifyTerse).orElse(payload).getBytes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.udmi.util.GeneralUtils.friendlyStackTrace;
import static com.google.udmi.util.GeneralUtils.ifNotNullGet;
import static com.google.udmi.util.GeneralUtils.ifNotNullThen;
import static com.google.udmi.util.GeneralUtils.ifTrueThen;
import static com.google.udmi.util.JsonUtil.toStringMap;
Expand All @@ -13,7 +12,6 @@
import com.google.bos.udmi.service.messaging.MessagePipe;
import com.google.common.base.Strings;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -145,7 +143,7 @@ private String makeBrokerUrl(EndpointConfiguration endpoint) {

private MqttMessage makeMqttMessage(Bundle bundle) {
MqttMessage message = new MqttMessage();
message.setPayload(bundle.getSendBytes());
message.setPayload(bundle.sendBytes());
return message;
}

Expand Down

0 comments on commit c212ae3

Please sign in to comment.