I have a text file which is not redacting below are the system details and code to reproduce. The text file is inside the zip.
@Test
void scratch() throws Exception {
try (Redactor r = new Redactor(getClass().getResourceAsStream("/50nature.txt"));
OutputStream o = Files.newOutputStream(Paths.get("build/redacted.txt"))) {
Redaction[] redactions =
new Redaction[] { new ExactPhraseRedaction("nature", false, new ReplacementOptions("*")) };
r.apply(redactions);
RasterizationOptions ro = new RasterizationOptions();
ro.setEnabled(false);
r.save(o, ro);
}
}
OS: Windows 11
Java: 17
Redaction SDK: 21.12
50nature.zip (219 Bytes)