Track changes issue in Aspose.words Java version 18.5 and JDK 16

Hello Team,

I am facing a problem during the Aspose Words document comparison.

Issue:

After document comparison, I obtain the expected result; however, I cannot observe any track changes in the compared file. Currently, I am using the Aspose 18.5 Java version.

I also tried Compare two DOCX files using Aspose Words Java this is giving me expected output for my documents.

Document firstDoc = new Document(firstFile.getAbsolutePath());
Document secondDoc = new Document(clientNewFile.getAbsolutePath());

if(firstDoc.hasRevisions()){
    firstDoc.acceptAllRevisions();
}

if (secondDoc.hasRevisions()){
    secondDoc.acceptAllRevisions();
}

firstDoc.getChildNodes(NodeType.COMMENT, true).clear();
secondDoc.getChildNodes(NodeType.COMMENT, true).clear();

CompareOptions options = new CompareOptions();
options.setIgnoreFormatting(true);
options.setIgnoreHeadersAndFooters(true);
options.setTarget(ComparisonTargetType.CURRENT);

secondDoc.compare(firstDoc, "Compare", new Date(), options);

File comparedFileDirectory = new File("uploads", UUID.randomUUID().toString());
comparedFileDirectory.mkdirs();
File comparedFile = new File(comparedFileDirectory, Objects.requireNonNull("output.docx"));

secondDoc.save(comparedFile.getAbsolutePath(), SaveFormat.DOCX); 

Here is the expected output, that I’m expecting.

Could you kindly provide the reason for these issues and suggest any possible solutions, if available?
documents.zip (17.4 KB)

@AbhijeetYadav26 As I can see the latest 24.10 version of Aspose.Words for Java produces the correct output:
out.docx (9.3 KB)

So, please try using the latest version and let us know if the problem still persists.