]> source.dussan.org Git - gitblit.git/commitdiff
[findbugs] Create temporary ticket after setting up the response page in EditTicketPage
authorJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 02:49:14 +0000 (22:49 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 03:08:07 +0000 (23:08 -0400)
src/main/java/com/gitblit/wicket/pages/EditTicketPage.java

index 00cd47d9f720556446118923eb474ae7e02b2def..64c0648af96ba5320e613b71a9e3c0778da3c88c 100644 (file)
@@ -101,6 +101,9 @@ public class EditTicketPage extends RepositoryPage {
                                || !currentUser.canEdit(ticket, getRepositoryModel())\r
                                || !app().tickets().isAcceptingTicketUpdates(getRepositoryModel())) {\r
                        setResponsePage(TicketsPage.class, WicketUtils.newObjectParameter(repositoryName, "" + ticketId));\r
+\r
+                       // create a placeholder object so we don't trigger NPEs\r
+                       ticket = new TicketModel();\r
                }\r
 \r
                typeModel = Model.of(ticket.type);\r