-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MODEXPW-528] Generate EDI file for claims #601
Conversation
private String fieldInListFilter(String fieldName, List<?> list) { | ||
return String.format(" AND %s==%s", fieldName, | ||
list.stream() | ||
.map(item -> String.format("\"%s\"", item.toString())) | ||
.collect(Collectors.joining(" OR ", "(", ")"))); | ||
} | ||
|
||
private static String fieldNotInListFilter(String fieldName, Collection<?> list) { | ||
return String.format(" AND cql.allRecords=1 NOT %s==%s", fieldName, | ||
list.stream() | ||
.map(item -> String.format("\"%s\"", item.toString())) | ||
.collect(Collectors.joining(" OR ", "(", ")"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reused existing util methods instead of these, both are removed
Looks good to me, but is that NOSONAR tag really needed? |
Yes I remember sonar was alarming about some security issue with the regex provided in this mod-orders PR |
...main/java/org/folio/dew/batch/acquisitions/edifact/exceptions/EntitiesNotFoundException.java
Outdated
Show resolved
Hide resolved
src/main/java/org/folio/dew/batch/acquisitions/edifact/jobs/EdifactExportJobConfig.java
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Purpose
[MODEXPW-528] Generate EDI file for claims
Approach
Learning
When writing special characters -
.
,?
,:
,'
they will always be escaped with?
. So if we writeabc?12:3
the output will beabc??12?:3
.To avoid this we need to user binary writer instead of string:
.writeStartElementBinary().writeBinaryData(ByteBuffer.wrap(data.getBytes()))