NPE thrown by comment.setHtmlNote()

Using Aspose Cells for Java, version 19.6.

Sample code:

Workbook workbook = new Workbook();
WorksheetCollection sheets = workbook.getWorksheets();
Worksheet sheet = sheets.get(0);
CommentCollection comments = sheet.getComments();

int index = comments.add(0, 0);
Comment comment = comments.get(index);
comment.setHtmlNote("a<font color='red'>b</font>\"c");

The last line throws the following exception:

Exception in thread "main" java.lang.NullPointerException
	at com.aspose.cells.zhn.a(Unknown Source)
	at com.aspose.cells.zhn.a(Unknown Source)
	at com.aspose.cells.zhn.a(Unknown Source)
	at com.aspose.cells.FontSettingCollection.setHtmlString(Unknown Source)
	at com.aspose.cells.Comment.setHtmlNote(Unknown Source)
	at <my code>

Please note that the same code works in Aspose Cells for Java 17.11.6, which is the version from which we upgraded our OEM Site license.

Kind regards,
Taras

@TarasTielkes,

Thanks for the code segment and details.

After an initial test, I am able to reproduce the issue as you mentioned by using your sample code. I have logged a ticket with an id “CELLSJAVA-42951” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@TarasTielkes,
This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-42951”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@TarasTielkes,
Please try our latest version/fix: Aspose.Cells for Java v19.6.3:
aspose-cells-19.6.3.zip (6.5 MB)

Your issue should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42951) have been fixed in Aspose.Cells for Java 19.7. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi