Skip to content

Commit

Permalink
[CCAP-671] Clean up for a few CodeQL warnings in github (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
cram-cfa authored Feb 13, 2025
1 parent b336882 commit f14778c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
14 changes: 14 additions & 0 deletions src/main/java/org/ilgcc/app/data/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,18 @@ public class Provider implements Serializable {
@OnDelete(action = OnDeleteAction.CASCADE)
@ManyToOne
private ResourceOrganization resourceOrganization;

@Override
public String toString() {
return "Provider{" +
"providerId=" + providerId +
", type='" + type + '\'' +
", city='" + city + '\'' +
", state='" + state + '\'' +
", zipCode='" + zipCode + '\'' +
", status='" + status + '\'' +
", dateOfLastApproval=" + dateOfLastApproval +
", resourceOrganization=" + resourceOrganization +
'}';
}
}
13 changes: 13 additions & 0 deletions src/main/java/org/ilgcc/app/data/ResourceOrganization.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,17 @@ public class ResourceOrganization {

@OneToMany(mappedBy = "resourceOrganization", fetch =FetchType.LAZY)
private Set<Provider> providers;

@Override
public String toString() {
return "ResourceOrganization{" +
"sda=" + sda +
", email='" + email + '\'' +
", phone='" + phone + '\'' +
", address='" + address + '\'' +
", name='" + name + '\'' +
", caseloadCode='" + caseloadCode + '\'' +
", resourceOrgId=" + resourceOrgId +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public Map<String, SubmissionField> prepareSubmissionFields(Submission submissio
}

if (useProviderResponse(submission)) {
return prepareProviderResponse(submission);
return prepareProviderResponse();
} else {
return prepareFamilyIntendedProviderData(submission);
}
}

//Because we are printing the PDF from the GCC flow we need to get the provider submission then pull the responses values from the provdier submission
private Map<String, SubmissionField> prepareProviderResponse(Submission submission) {
//Because we are printing the PDF from the GCC flow we need to get the provider submission then pull the responses values from the provider submission
private Map<String, SubmissionField> prepareProviderResponse() {
var results = new HashMap<String, SubmissionField>();

Map<String, Object> providerInputData = providerSubmission.getInputData();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ilgcc/app/utils/ZipcodeOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public static Boolean isValidZipcodeOption(String zipcode, Boolean includeSDA15)
}

public static Optional<String> getCaseLoadCodeByZipCode(String zipcode) {
Boolean hasZip = ZIPCODE_MAP.containsKey(zipcode);
boolean hasZip = ZIPCODE_MAP.containsKey(zipcode);
return hasZip ? Optional.of(ZIPCODE_MAP.get(zipcode)) : Optional.empty();
}
}

0 comments on commit f14778c

Please sign in to comment.