From c478704ab797e85c4e55fa2f4372dc569b38edbd Mon Sep 17 00:00:00 2001 From: Santiago Revilla Date: Thu, 26 Aug 2021 18:08:57 -0300 Subject: [PATCH] fix: Avoid possible NPE when revision's author is null. --- modules/qi-core/src/main/java/org/jpos/qi/RevisionsPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/qi-core/src/main/java/org/jpos/qi/RevisionsPanel.java b/modules/qi-core/src/main/java/org/jpos/qi/RevisionsPanel.java index 0c17fbbf9b..35ab84e00d 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/RevisionsPanel.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/RevisionsPanel.java @@ -50,7 +50,8 @@ public RevisionsPanel (String ref, DB db) { addStyleName(revisions.size() > 0 ? "revision-history" : "invisible"); } private void addRevision (Revision r) { - Label author = new Label("" + r.getAuthor().getName() + "", ContentMode.HTML); + String auth = r.getAuthor() != null ? r.getAuthor().getName() : "author-unknown"; + Label author = new Label("" + auth + "", ContentMode.HTML); Label date = new Label(r.getDate().toString()); Label info = new Label(r.getInfo(), ContentMode.HTML); author.setWidth("60%");