Skip to content

Commit

Permalink
Merge pull request #49 from rosensilva/master
Browse files Browse the repository at this point in the history
Send empty string when redis cache for the key is null
  • Loading branch information
rosensilva authored Sep 22, 2024
2 parents a5ca5a9 + 3266d4a commit 18f4a0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/wso2/carbon/connector/operations/Get.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.wso2.carbon.connector.core.AbstractConnector;
import org.wso2.carbon.connector.core.ConnectException;
import org.wso2.carbon.connector.util.RedisConstants;
import org.wso2.carbon.connector.util.Constants;
import redis.clients.jedis.Jedis;

public class Get extends AbstractConnector {
Expand Down Expand Up @@ -50,7 +51,7 @@ public void connect(MessageContext messageContext) throws ConnectException {
if (response != null) {
messageContext.setProperty(RedisConstants.RESULT, response);
} else {
handleException("Redis server throw null response", messageContext);
response = Constants.NULL_STRING;
}
} catch (Exception e) {
handleException("Error while connecting the server or calling the redis method", e, messageContext);
Expand Down

0 comments on commit 18f4a0c

Please sign in to comment.