fixed PMD

This commit is contained in:
Timo 2021-07-19 11:59:53 +03:00
parent 0b89c55a1d
commit d4486ea6f4

View File

@ -666,17 +666,17 @@ public class RedactionLogCreatorService {
// Cannot undo Already Approved change because UI won't allow it for now
if (Status.REQUESTED.equals(entry.getStatus())) {
var recategorizeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
if (!recategorizeExists) {
if (entry.getManualRedactionType() == ManualRedactionType.RECATEGORIZE) {
if (entry.getManualRedactionType() == ManualRedactionType.RECATEGORIZE) {
var recategorizeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
if (!recategorizeExists) {
entry.setManual(false);
entry.setStatus(null);
entry.setRecategorizationType(null);
}
}
var legalBasisChangeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
if (!legalBasisChangeExists) {
if (entry.getManualRedactionType() == ManualRedactionType.LEGAL_BASIS_CHANGE) {
if (entry.getManualRedactionType() == ManualRedactionType.LEGAL_BASIS_CHANGE) {
var legalBasisChangeExists = manualRedactions.getImageRecategorizations().stream().anyMatch(entryToAdd -> entryToAdd.getId().equalsIgnoreCase(entry.getId()));
if (!legalBasisChangeExists) {
entry.setManual(false);
entry.setStatus(null);
entry.setLegalBasisChangeValue(null);