Skip to content
Snippets Groups Projects
Commit e72d888e authored by Muskan Srivastava's avatar Muskan Srivastava
Browse files

small change

parent 61abfde6
No related branches found
No related tags found
Loading
Pipeline #43659 failed
......@@ -41,7 +41,7 @@ public class RetryPolicy {
private int attempts = 3;
private int waitDuration = 1000;
private String recordNotFound = "notFound";
private final String RECORD_NOT_FOUND = "notFound";
/**
* @return RetryConfig with 3 attempts and 1 sec wait time
......@@ -64,7 +64,7 @@ public class RetryPolicy {
return false;
}
JsonObject jsonObject = new JsonParser().parse(response.getBody()).getAsJsonObject();
JsonElement notFoundElement = (JsonArray) jsonObject.get(recordNotFound);
JsonElement notFoundElement = (JsonArray) jsonObject.get(RECORD_NOT_FOUND);
if (notFoundElement == null ||
!notFoundElement.isJsonArray() ||
notFoundElement.getAsJsonArray().size() == 0 ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment