Step 98 - Using GSON to persist your todo model as JSON #510

CLOSED learning portal
Submitted vor 2 Wochen

Hi, following your example, I get the following error;

Caused by: java.lang.NullPointerException at com.vogella.tasks.model.Todo.setSummary(Todo.java:45)

I ran it in debug mode and the "changes" field is null.

Comments

  vor 2 Wochen

Thanks for reporting. I’m now going through https://learn.vogella.com/exercises/rich-client-platform/using-the-gson-library-in-your-application-0DKT2 to see if it still works for me.

  vor 2 Wochen

Status update: I reproduced the problem and implemented a workaround. Baseline is that the PropertyChangeSupport is not restored by GSON and therefore null. I will update description tomorrow to reflect the workaround (and implement a few other enhancements)

  vor 2 Wochen

Thank you very much!

  vor 2 Wochen

I close this issue, please reopen if you still face issue.

Please login to write a comment.