From: James Moger Date: Fri, 7 Mar 2014 17:23:23 +0000 (-0500) Subject: Fix NPE in the Edit Ticket page X-Git-Tag: v1.4.0~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c346a9c84fb14713b4974304c96bf3c1d6f508e0;p=gitblit.git Fix NPE in the Edit Ticket page --- diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java index 5fa31975..ac759589 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java @@ -134,13 +134,14 @@ public class EditTicketPage extends RepositoryPage { Change change = new Change(createdBy); String title = titleModel.getObject(); - if (!ticket.title.equals(title)) { + if (!StringUtils.isEmpty(title) && !ticket.title.equals(title)) { // title change change.setField(Field.title, title); } String description = descriptionEditor.getText(); - if (!ticket.body.equals(description)) { + if ((StringUtils.isEmpty(ticket.body) && !StringUtils.isEmpty(description)) + || (!StringUtils.isEmpty(ticket.body) && !ticket.body.equals(description))) { // description change change.setField(Field.body, description); }