diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:49:14 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | 856a13892c850f5ab8f3b5dae664525261f886c6 (patch) | |
tree | 91574782a0f554a0cccafe930b525bcd6536eefa | |
parent | f531f8fc369af11a8d0f1a179e35bc8b5c9947cb (diff) | |
download | gitblit-856a13892c850f5ab8f3b5dae664525261f886c6.tar.gz gitblit-856a13892c850f5ab8f3b5dae664525261f886c6.zip |
[findbugs] Create temporary ticket after setting up the response page in EditTicketPage
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/EditTicketPage.java | 3 |
1 files changed, 3 insertions, 0 deletions
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);
|