Skip to content

Commit 0d28367

Browse files
Code Rabbit Fixes
1 parent a5dc6b0 commit 0d28367

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

JeMPI_Apps/JeMPI_LibAPI/src/main/java/org/jembi/jempi/libapi/Routes.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,10 @@ public static Route getAgeGroupCount(
582582
}));
583583
}
584584

585-
private static Route getDataList(
586-
final ActorSystem<Void> actorSystem,
587-
final ActorRef<BackEnd.Event> backEnd) {
588-
return entity(Jackson.unmarshaller(ApiModels.AllList.class),
585+
public static Route getDataList(
586+
final ActorSystem<Void> actorSystem,
587+
final ActorRef<BackEnd.Event> backEnd) {
588+
return entity(Jackson.unmarshaller(ApiModels.AllList.class),
589589
request -> onComplete(Ask.getAllList(actorSystem, backEnd, request),
590590
result -> {
591591
if (!result.isSuccess()) {
@@ -595,7 +595,7 @@ private static Route getDataList(
595595
}));
596596
}
597597

598-
private static Route getFieldsConfiguration(
598+
public static Route getFieldsConfiguration(
599599
final ActorSystem<Void> actorSystem,
600600
final ActorRef<BackEnd.Event> backEnd) {
601601
return onComplete(Ask.getFieldsConfiguration(actorSystem, backEnd),
@@ -607,7 +607,7 @@ private static Route getFieldsConfiguration(
607607
});
608608
}
609609

610-
private static Route postConfiguration(
610+
public static Route postConfiguration(
611611
final ActorSystem<Void> actorSystem,
612612
final ActorRef<BackEnd.Event> backEnd) {
613613
return entity(Jackson.unmarshaller(Configuration.class),

JeMPI_Apps/JeMPI_LibMPI/src/main/java/org/jembi/jempi/libmpi/dgraph/DgraphQueries.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static String getFieldCount(final ApiModels.CountFields countFields) {
489489
String endDate = countFields.endDate(); // Assume endDate is of LocalDate type
490490

491491
boolean hasValues = fieldValues != null && !fieldValues.isEmpty();
492-
boolean hasDateRange = startDate != null && endDate != null && !startDate.isEmpty() && !endDate.isEmpty();
492+
boolean hasDateRange = startDate != null && endDate != null;
493493

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

13311331
// Extract each `dob` and add to the list
1332-
if (recordArray != null) {
1332+
if (recordArray != null && recordArray.isArray()) {
13331333
for (JsonNode person : recordArray) {
13341334
if (person.has("GoldenRecord.dob")) {
13351335
dobList.add(person.get("GoldenRecord.dob").asText());

0 commit comments

Comments
 (0)