import com.gitblit.wicket.GitBlitWebSession;\r
import com.gitblit.wicket.WicketUtils;\r
import com.gitblit.wicket.panels.MarkdownTextArea;\r
+import com.google.common.base.Optional;\r
\r
/**\r
* Page for editing a ticket.\r
change.setField(Field.title, title);\r
}\r
\r
- String description = descriptionEditor.getText();\r
+ String description = Optional.fromNullable(descriptionEditor.getText()).or("");\r
if ((StringUtils.isEmpty(ticket.body) && !StringUtils.isEmpty(description))\r
|| (!StringUtils.isEmpty(ticket.body) && !ticket.body.equals(description))) {\r
// description change\r
change.setField(Field.type, type);\r
}\r
\r
- String topic = topicModel.getObject();\r
+ String topic = Optional.fromNullable(topicModel.getObject()).or("");\r
if ((StringUtils.isEmpty(ticket.topic) && !StringUtils.isEmpty(topic))\r
- || (!StringUtils.isEmpty(topic) && !topic.equals(ticket.topic))) {\r
+ || (!StringUtils.isEmpty(ticket.topic) && !ticket.topic.equals(topic))) {\r
// topic change\r
change.setField(Field.topic, topic);\r
}\r