From: James Moger Date: Fri, 18 Apr 2014 02:49:14 +0000 (-0400) Subject: [findbugs] Create temporary ticket after setting up the response page in EditTicketPage X-Git-Tag: v1.5.0~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=856a13892c850f5ab8f3b5dae664525261f886c6;p=gitblit.git [findbugs] Create temporary ticket after setting up the response page in EditTicketPage --- diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java index 00cd47d9..64c0648a 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java @@ -101,6 +101,9 @@ public class EditTicketPage extends RepositoryPage { || !currentUser.canEdit(ticket, getRepositoryModel()) || !app().tickets().isAcceptingTicketUpdates(getRepositoryModel())) { setResponsePage(TicketsPage.class, WicketUtils.newObjectParameter(repositoryName, "" + ticketId)); + + // create a placeholder object so we don't trigger NPEs + ticket = new TicketModel(); } typeModel = Model.of(ticket.type);