RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested
- fix PMD violations
This commit is contained in:
parent
db16cc0ab3
commit
6ee500c1c7
@ -314,17 +314,13 @@ public class ManualRedactionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!removeRedactionRequest.isRemoveFromDictionary() && AnnotationStatus.APPROVED.equals(removeRedactionRequest.getStatus())) {
|
if (!removeRedactionRequest.isRemoveFromDictionary() && AnnotationStatus.APPROVED.equals(removeRedactionRequest.getStatus())) {
|
||||||
Optional<RedactionLogEntry> redactionLogEntryOptional = redactionLog.getRedactionLogEntry()
|
|
||||||
.stream()
|
|
||||||
.filter(entry -> entry.getId().equals(removeRedactionRequest.getAnnotationId()))
|
|
||||||
.findFirst();
|
|
||||||
RedactionLogEntry redactionLogEntry = null;
|
RedactionLogEntry redactionLogEntry = null;
|
||||||
boolean requiresAnalysis = false;
|
boolean requiresAnalysis = false;
|
||||||
try {
|
try {
|
||||||
redactionLogEntry = getRedactionLogEntry(redactionLog, removeRedactionRequest.getAnnotationId());
|
redactionLogEntry = getRedactionLogEntry(redactionLog, removeRedactionRequest.getAnnotationId());
|
||||||
requiresAnalysis = redactionLogEntry.isHint();
|
requiresAnalysis = redactionLogEntry.isHint();
|
||||||
} catch (NotFoundException e) {
|
} catch (NotFoundException e) {
|
||||||
|
requiresAnalysis = false;
|
||||||
}
|
}
|
||||||
actionPerformed = actionPerformed || requiresAnalysis;
|
actionPerformed = actionPerformed || requiresAnalysis;
|
||||||
if (!requiresAnalysis && idRemoval.isApproved()) {
|
if (!requiresAnalysis && idRemoval.isApproved()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user