PR Improvements
This commit is contained in:
parent
5d18a46ec3
commit
5d286f58e9
@ -219,7 +219,7 @@ public class EntityRedactionService {
|
||||
|
||||
private void addSectionToManualRedactions(List<TextBlock> textBlocks, ManualRedactions manualRedactions, String section, int sectionNumber) {
|
||||
|
||||
if (manualRedactions == null) {
|
||||
if (manualRedactions == null || manualRedactions.getEntriesToAdd().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.iqser.red.service.redaction.v1.server.redaction.utils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.hash.HashFunction;
|
||||
@ -21,11 +22,11 @@ public class IdBuilder {
|
||||
sb.append(textPosition.getTextMatrix());
|
||||
}));
|
||||
|
||||
return hashFunction.hashBytes(sb.toString().getBytes()).toString();
|
||||
return hashFunction.hashString(sb.toString(), StandardCharsets.UTF_8).toString();
|
||||
}
|
||||
|
||||
|
||||
public String buildId(ManualRedactionEntry manualRedactionEntry) {
|
||||
return hashFunction.hashBytes(manualRedactionEntry.toString().getBytes()).toString();
|
||||
return hashFunction.hashString(manualRedactionEntry.toString(), StandardCharsets.UTF_8).toString();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user