summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-25 10:21:08 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-25 10:21:08 -0400
commit459ac5c56f5af296c2e5375be84abe384e6410af (patch)
tree13d53ff47f2f8de544f609cdc1f244af389c04c7 /src/main/java
parent219722e27a5832b33d2fad7cd5649015ea3523a8 (diff)
parent388f49ada1b32bd2e99c964a0278094e4f21c3fb (diff)
downloadgitblit-459ac5c56f5af296c2e5375be84abe384e6410af.tar.gz
gitblit-459ac5c56f5af296c2e5375be84abe384e6410af.zip
Merge branch 'ticket/188' into develop
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTicketPage.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
index 1adc7136..074ffa60 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
@@ -52,6 +52,7 @@ import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.panels.MarkdownTextArea;
+import com.google.common.base.Optional;
/**
* Page for editing a ticket.
@@ -268,7 +269,7 @@ public class EditTicketPage extends RepositoryPage {
change.setField(Field.title, title);
}
- String description = descriptionEditor.getText();
+ String description = Optional.fromNullable(descriptionEditor.getText()).or("");
if ((StringUtils.isEmpty(ticket.body) && !StringUtils.isEmpty(description))
|| (!StringUtils.isEmpty(ticket.body) && !ticket.body.equals(description))) {
// description change
@@ -287,9 +288,9 @@ public class EditTicketPage extends RepositoryPage {
change.setField(Field.type, type);
}
- String topic = topicModel.getObject();
+ String topic = Optional.fromNullable(topicModel.getObject()).or("");
if ((StringUtils.isEmpty(ticket.topic) && !StringUtils.isEmpty(topic))
- || (!StringUtils.isEmpty(topic) && !topic.equals(ticket.topic))) {
+ || (!StringUtils.isEmpty(ticket.topic) && !ticket.topic.equals(topic))) {
// topic change
change.setField(Field.topic, topic);
}