Skip to content

Commit 20a5b88

Browse files
authored
Update FieldLevelEncryption.java (#113)
Fix for sonar issue - major
1 parent 18ddbca commit 20a5b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/mastercard/developer/encryption/FieldLevelEncryption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private static DocumentContext decryptPayloadPath(DocumentContext payloadContext
193193
JsonParser.checkOrCreateOutObject(payloadContext, jsonPathOut);
194194
JsonParser.addDecryptedDataToPayload(payloadContext, decryptedValue, jsonPathOut);
195195

196-
if(jsonPathIn != jsonPathOut) {
196+
if(!jsonPathIn.equals(jsonPathOut)) {
197197
// Remove the input if now empty
198198
Object inJsonElement = JsonParser.readJsonElement(payloadContext, jsonPathIn);
199199
if (0 == jsonProvider.length(inJsonElement)) {

0 commit comments

Comments
 (0)