@@ -32,7 +32,7 @@ public EmailOnPushService withTagPushEvents(Boolean pushEvents) {
3232
3333 @ JsonIgnore
3434 public String getRecipients () {
35- return (( String ) getProperty (RECIPIENT_PROP ));
35+ return (getProperty (RECIPIENT_PROP ));
3636 }
3737 public void setRecipients (String recipients ) {
3838 setProperty (RECIPIENT_PROP , recipients );
@@ -45,7 +45,7 @@ public EmailOnPushService withRecipients(String recipients) {
4545
4646 @ JsonIgnore
4747 public Boolean getDisableDiffs () {
48- return Boolean .valueOf (getProperty (DISABLE_DIFFS_PROP ," false" ));
48+ return Boolean .valueOf (getProperty (DISABLE_DIFFS_PROP , false ));
4949 }
5050 public void setDisableDiffs (Boolean disableDiffs ) {
5151 setProperty (DISABLE_DIFFS_PROP , disableDiffs );
@@ -54,10 +54,10 @@ public EmailOnPushService withDisableDiffs(Boolean disableDiffs) {
5454 setDisableDiffs (disableDiffs );
5555 return this ;
5656 }
57-
57+
5858 @ JsonIgnore
5959 public Boolean getSendFromCommitterEmail () {
60- return Boolean .valueOf (getProperty (SEND_FROM_COMMITTER_EMAIL_PROP ," false" ));
60+ return Boolean .valueOf (getProperty (SEND_FROM_COMMITTER_EMAIL_PROP , false ));
6161 }
6262 public void setSendFromCommitterEmail (Boolean sendFromCommitterEmail ) {
6363 setProperty (SEND_FROM_COMMITTER_EMAIL_PROP , sendFromCommitterEmail );
@@ -68,16 +68,20 @@ public EmailOnPushService withSendFromCommitterEmail(Boolean sendFromCommitterEm
6868 }
6969
7070 @ JsonIgnore
71- public String getBranchesToBeNotified () {
72- return ((String )getProperty (BRANCHES_TO_BE_NOTIFIED_PROP ));
71+ public BranchesToBeNotified getBranchesToBeNotified () {
72+ String branchesToBeNotified = getProperty (BRANCHES_TO_BE_NOTIFIED_PROP );
73+
74+ if (branchesToBeNotified == null || branchesToBeNotified .isEmpty ()) {
75+ return null ;
76+ }
77+
78+ return (BranchesToBeNotified .valueOf (branchesToBeNotified .toUpperCase ()));
7379 }
74- public void setBranchesToBeNotified (String branchesToBeNotified ) {
75- setProperty (BRANCHES_TO_BE_NOTIFIED_PROP , branchesToBeNotified );
80+ public void setBranchesToBeNotified (BranchesToBeNotified branchesToBeNotified ) {
81+ setProperty (BRANCHES_TO_BE_NOTIFIED_PROP , branchesToBeNotified . toString () );
7682 }
77- public EmailOnPushService withBranchesToBeNotified (String branchesToBeNotified ) {
83+ public EmailOnPushService withBranchesToBeNotified (BranchesToBeNotified branchesToBeNotified ) {
7884 setBranchesToBeNotified (branchesToBeNotified );
7985 return this ;
8086 }
81-
82-
8387}
0 commit comments