]> source.dussan.org Git - gitblit.git/commitdiff
Fix NPE when adding a permission without a registrant (issue-344)
authorJames Moger <james.moger@gitblit.com>
Tue, 26 Nov 2013 13:47:57 +0000 (08:47 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 26 Nov 2013 13:47:57 +0000 (08:47 -0500)
Change-Id: Id6bf070a43072a61a0034bd2d971fc819c9b03e3

.classpath
releases.moxie
src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java

index 2803f8d6e48d6ea49634875a34a718ea0e8f73fa..91e6a8bc03188153131bf490660cc84190d4f3d6 100644 (file)
        <classpathentry kind="lib" path="ext/commons-logging-1.1.1.jar" sourcepath="ext/src/commons-logging-1.1.1.jar" />
        <classpathentry kind="lib" path="ext/commons-exec-1.1.jar" sourcepath="ext/src/commons-exec-1.1.jar" />
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
+       <classpathentry kind="src" path="src/main/dagger">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry kind="output" path="bin/classes" />
 </classpath>
index 5433a9da22ec912f075dcde759fc838a58fdd2d6..ca2982519aa1c99be8020f41352a0cf74f1da9f2 100644 (file)
@@ -12,6 +12,7 @@ r20: {
     fixes:
        - Fixed support for implied SSH urls in web.otherUrls (issue-311)
        - Bind LDAP connection after establishing TLS initialization (issue-343)
+       - Fixed NPE when attempting to add a permission without a registrant (issue-344)
        - Fix potential NPE on removing uncached repository from cache
        - Ignore the default contents of .git/description file
        - Fix error on generating activity page when there is no activity
@@ -72,6 +73,7 @@ r20: {
        - Domingo Oropeza
        - Chris Graham
        - Guenter Dressel
+       - fpeters.fae
 }
 
 #
index b728082b816fcae82f1704798c9da8d0b5a53467..dd25c48a4ebdf097b4c351f3504b69dc77d2a62a 100644 (file)
@@ -261,6 +261,9 @@ public class RegistrantPermissionsPanel extends BasePanel {
                                if (rp.permission == null) {
                                        return;
                                }
+                               if (rp.registrant == null) {
+                                       return;
+                               }
                                RegistrantAccessPermission copy = DeepCopier.copy(rp);
                                if (StringUtils.findInvalidCharacter(copy.registrant) != null) {
                                        copy.permissionType = PermissionType.REGEX;