Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove needless null check #537

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions samples/Mqtt5/PubSub/src/main/java/pubsub/PubSub.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ static final class SamplePublishEvents implements Mqtt5ClientOptions.PublishEven
@Override
public void onMessageReceived(Mqtt5Client client, PublishReturn publishReturn) {
PublishPacket publishPacket = publishReturn.getPublishPacket();
if (publishPacket == null) {
messagesReceived.countDown();
return;
}

System.out.println("Publish received on topic: " + publishPacket.getTopic());
System.out.println("Message: " + new String(publishPacket.getPayload()));
Expand All @@ -123,7 +119,6 @@ public static void main(String[] args) {
CommandLineUtils.SampleCommandLineData cmdData = CommandLineUtils.getInputForIoTSample("Mqtt5PubSub", args);

try {
/* Create a client based on desired connection type */
SampleLifecycleEvents lifecycleEvents = new SampleLifecycleEvents();
SamplePublishEvents publishEvents = new SamplePublishEvents(cmdData.input_count);
Mqtt5Client client;
Expand Down
Loading