]> source.dussan.org Git - gitblit.git/commitdiff
Fix repository mailing list editing which prevented field reset 37/37/1
authorJames Moger <james.moger@gitblit.com>
Thu, 27 Mar 2014 13:25:36 +0000 (09:25 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 27 Mar 2014 13:25:36 +0000 (09:25 -0400)
releases.moxie
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java

index c9687e269e93be300d062946af367c06ffb2925f..0a57d4008653849e31daf599d520f5a5d798ec74 100644 (file)
@@ -10,6 +10,7 @@ r22: {
     text: ~
     security: ~
     fixes:
+    - Repository mailing lists could not be reset from the Edit Repository page (issue-399)
     - Ensure the Lucene ticket index is updated on repository deletion.
     changes:
     - Option to allow LDAP users to directly authenticate without performing LDAP searches
index f860eeb33bb0c3222c4842eb9fb784e3f38c813b..1f37763a8c1f05de551121b23b66e6615058a1e3 100644 (file)
@@ -339,7 +339,9 @@ public class EditRepositoryPage extends RootSubPage {
 \r
                                        // set author metric exclusions\r
                                        String ax = metricAuthorExclusions.getObject();\r
-                                       if (!StringUtils.isEmpty(ax)) {\r
+                                       if (StringUtils.isEmpty(ax)) {\r
+                                               repositoryModel.metricAuthorExclusions = new ArrayList<String>();\r
+                                       } else {\r
                                                Set<String> list = new HashSet<String>();\r
                                                for (String exclusion : StringUtils.getStringsFromValue(ax,  " ")) {\r
                                                        if (StringUtils.isEmpty(exclusion)) {\r
@@ -356,7 +358,9 @@ public class EditRepositoryPage extends RootSubPage {
 \r
                                        // set mailing lists\r
                                        String ml = mailingLists.getObject();\r
-                                       if (!StringUtils.isEmpty(ml)) {\r
+                                       if (StringUtils.isEmpty(ml)) {\r
+                                               repositoryModel.mailingLists = new ArrayList<String>();\r
+                                       } else {\r
                                                Set<String> list = new HashSet<String>();\r
                                                for (String address : ml.split("(,|\\s)")) {\r
                                                        if (StringUtils.isEmpty(address)) {\r