Commit 18909da0 authored by Franck Desaize's avatar Franck Desaize
Browse files

Fix Quality gate

parent d95af84b
Pipeline #269937 failed with stages
in 66 minutes and 37 seconds
......@@ -166,6 +166,7 @@ public class PatientCrossReferenceSearchImpl implements PatientCrossReferenceSea
for (EntityIdentifier entityIdentifier : patient.getIdentifiers()) {
if (targetDomains.contains(entityIdentifier.getSystemIdentifier())) {
patients.add(patient);
break;
}
}
}
......
......@@ -70,7 +70,7 @@ public class XRefSearchClient implements PatientCrossReferenceSearch {
throw new SearchCrossReferenceException("Invalid operation used on distant CrossReferenceSearchProcessingService !", e);
} catch (IllegalArgumentException e) {
throw new SearchCrossReferenceException("Invalid Request sent to distant CrossReferenceSearchProcessingService !", e);
} catch (SearchException e) {
} catch (SearchCrossReferenceException e) {
throw new SearchCrossReferenceException("Invalid Request sent to distant CrossReferenceSearchProcessingService !", e);
}
}
......@@ -85,7 +85,7 @@ public class XRefSearchClient implements PatientCrossReferenceSearch {
* @throws SearchException : if the X-ref Search raised an exception in the remote Repository.
*/
private PatientAliases extractPatientAliasesFromProcessResponse(ProcessResponse processResponse) throws XRefSearchProcessResponseException,
SearchException {
SearchCrossReferenceException {
if (processResponse == null) {
throw new XRefSearchProcessResponseException("Empty Response from the distant CrossReferenceSearchProcessingService !");
} else {
......@@ -133,14 +133,14 @@ public class XRefSearchClient implements PatientCrossReferenceSearch {
* @return {@link SearchException} to be thrown by the {@link XRefSearchClient}
* @throws XRefSearchProcessResponseException : if the report is not well formed.
*/
private SearchException createExceptionFromProcessResponseReport(TAR report) throws XRefSearchProcessResponseException {
private SearchCrossReferenceException createExceptionFromProcessResponseReport(TAR report) throws XRefSearchProcessResponseException {
if (report.getReports() == null || report.getReports().getInfoOrWarningOrError().size() != 1) {
throw new XRefSearchProcessResponseException("The report from the ProcessResponse shall not be null and shall contain a single error.");
} else {
try {
BAR error = (BAR) report.getReports().getInfoOrWarningOrError().get(0).getValue();
if (error.getDescription() != null && !error.getDescription().isEmpty()) {
return new SearchException(error.getDescription());
return new SearchCrossReferenceException(error.getDescription());
} else {
throw new XRefSearchProcessResponseException("Error from ProcessResponse report must have a valid description !");
}
......
......@@ -63,6 +63,7 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment