Skip to content

Commit

Permalink
Fix spotBug issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinperera00 committed Oct 9, 2024
1 parent 4d02e87 commit ac52442
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
package io.ballerina.stdlib.mqtt.listener;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
import io.ballerina.runtime.api.Runtime;
import io.ballerina.runtime.api.async.StrandMetadata;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.RemoteMethodType;
import io.ballerina.runtime.api.types.ServiceType;
Expand Down Expand Up @@ -92,7 +90,6 @@ public void deliveryComplete(IMqttToken token) {

private void invokeOnMessage(MqttMessage message, String topic) {
BMap<BString, Object> bMqttMessage = getBMqttMessage(message, topic);
StrandMetadata metadata = getStrandMetadata(MqttConstants.ONMESSAGE);
boolean callerExists = isCallerAvailable();
Object result;
if (!isMethodImplemented(MqttConstants.ONMESSAGE)) {
Expand Down Expand Up @@ -170,9 +167,4 @@ private Optional<RemoteMethodType> getRemoteMethodType(String methodName) {
}
return Optional.empty();
}

private StrandMetadata getStrandMetadata(String parentFunctionName) {
Module module = getModule();
return new StrandMetadata(module.getOrg(), module.getName(), module.getMajorVersion(), parentFunctionName);
}
}

0 comments on commit ac52442

Please sign in to comment.