Skip to content

Commit

Permalink
Code Rabbit Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantpatil1214 committed Oct 22, 2024
1 parent a5dc6b0 commit 0d28367
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,10 @@ public static Route getAgeGroupCount(
}));
}

private static Route getDataList(
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd) {
return entity(Jackson.unmarshaller(ApiModels.AllList.class),
public static Route getDataList(
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd) {
return entity(Jackson.unmarshaller(ApiModels.AllList.class),
request -> onComplete(Ask.getAllList(actorSystem, backEnd, request),
result -> {
if (!result.isSuccess()) {
Expand All @@ -595,7 +595,7 @@ private static Route getDataList(
}));
}

private static Route getFieldsConfiguration(
public static Route getFieldsConfiguration(
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd) {
return onComplete(Ask.getFieldsConfiguration(actorSystem, backEnd),
Expand All @@ -607,7 +607,7 @@ private static Route getFieldsConfiguration(
});
}

private static Route postConfiguration(
public static Route postConfiguration(
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd) {
return entity(Jackson.unmarshaller(Configuration.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ static String getFieldCount(final ApiModels.CountFields countFields) {
String endDate = countFields.endDate(); // Assume endDate is of LocalDate type

boolean hasValues = fieldValues != null && !fieldValues.isEmpty();
boolean hasDateRange = startDate != null && endDate != null && !startDate.isEmpty() && !endDate.isEmpty();
boolean hasDateRange = startDate != null && endDate != null;

StringBuilder queryBuilder = new StringBuilder();
queryBuilder.append("query count() {");
Expand Down Expand Up @@ -1329,7 +1329,7 @@ private static List<String> parseDobFromResponse(final String responseJson) thro
JsonNode recordArray = jsonNode.get("peopleInDateRange");

// Extract each `dob` and add to the list
if (recordArray != null) {
if (recordArray != null && recordArray.isArray()) {
for (JsonNode person : recordArray) {
if (person.has("GoldenRecord.dob")) {
dobList.add(person.get("GoldenRecord.dob").asText());
Expand Down

0 comments on commit 0d28367

Please sign in to comment.