directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1397019 - in /directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor: dialogs/ widgets/
Date Thu, 11 Oct 2012 12:25:03 GMT
Author: pamarcelot
Date: Thu Oct 11 12:25:02 2012
New Revision: 1397019

URL: http://svn.apache.org/viewvc?rev=1397019&view=rev
Log:
Fix for DIRSTUDIO-833 (NPE in ACI Item Editor when adding AttributeType permission).
The 'precedence' variable is now an Integer (Object) instead of an int (primitive type). Added
null checks.

Modified:
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java?rev=1397019&r1=1397018&r2=1397019&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
Thu Oct 11 12:25:02 2012
@@ -179,7 +179,7 @@ public class ItemPermissionDialog extend
         // set initial values
         if ( initialItemPermission != null )
         {
-            if ( initialItemPermission.getPrecedence() > -1 )
+            if ( ( initialItemPermission.getPrecedence() != null ) && ( initialItemPermission.getPrecedence()
> -1 ) )
             {
                 precedenceCheckbox.setSelection( true );
                 precedenceSpinner.setEnabled( true );

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java?rev=1397019&r1=1397018&r2=1397019&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
Thu Oct 11 12:25:02 2012
@@ -175,7 +175,7 @@ public class UserPermissionDialog extend
         // set initial values
         if ( initialUserPermission != null )
         {
-            if ( initialUserPermission.getPrecedence() > -1 )
+            if ( ( initialUserPermission.getPrecedence() != null ) && ( initialUserPermission.getPrecedence()
> -1 ) )
             {
                 precedenceCheckbox.setSelection( true );
                 precedenceSpinner.setEnabled( true );

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java?rev=1397019&r1=1397018&r2=1397019&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
Thu Oct 11 12:25:02 2012
@@ -125,7 +125,7 @@ public class ACIItemItemPermissionsCompo
             else
             {
                 StringBuffer buffer = new StringBuffer();
-                if ( itemPermission.getPrecedence() > -1 )
+                if ( ( itemPermission.getPrecedence() != null ) && ( itemPermission.getPrecedence()
> -1 ) )
                 {
                     buffer.append( '(' );
                     buffer.append( itemPermission.getPrecedence() );

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java?rev=1397019&r1=1397018&r2=1397019&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
Thu Oct 11 12:25:02 2012
@@ -125,7 +125,7 @@ public class ACIItemUserPermissionsCompo
             else
             {
                 StringBuffer buffer = new StringBuffer();
-                if ( userPermission.getPrecedence() > -1 )
+                if ( ( userPermission.getPrecedence() != null ) && ( userPermission.getPrecedence()
> -1 ))
                 {
                     buffer.append( '(' );
                     buffer.append( userPermission.getPrecedence() );



Mime
View raw message