directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r749809 - /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
Date Tue, 03 Mar 2009 22:42:18 GMT
Author: seelmann
Date: Tue Mar  3 22:42:18 2009
New Revision: 749809

URL: http://svn.apache.org/viewvc?rev=749809&view=rev
Log:
Fixed a NPE

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=749809&r1=749808&r2=749809&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
Tue Mar  3 22:42:18 2009
@@ -176,24 +176,27 @@
     private Object[] getValues( IAttribute[] attributes, boolean showOperationalAttributes
)
     {
         List<Object> valueList = new ArrayList<Object>();
-        for ( IAttribute attribute : attributes )
+        if ( attributes != null )
         {
-            if ( !attribute.isOperationalAttribute() || showOperationalAttributes
-                || ( attribute.getEntry() instanceof IRootDSE ) )
+            for ( IAttribute attribute : attributes )
             {
-                IValue[] values = attribute.getValues();
-                if ( preferences == null || !preferences.isUseFolding()
-                    || ( values.length <= preferences.getFoldingThreshold() ) )
+                if ( !attribute.isOperationalAttribute() || showOperationalAttributes
+                    || ( attribute.getEntry() instanceof IRootDSE ) )
                 {
-                    for ( IValue value : values )
+                    IValue[] values = attribute.getValues();
+                    if ( preferences == null || !preferences.isUseFolding()
+                        || ( values.length <= preferences.getFoldingThreshold() ) )
                     {
-                        valueList.add( value );
+                        for ( IValue value : values )
+                        {
+                            valueList.add( value );
+                        }
+                    }
+                    else
+                    {
+                        // if folding threshold is exceeded then return the attribute itself
+                        valueList.add( attribute );
                     }
-                }
-                else
-                {
-                    // if folding threshold is exceeded then return the attribute itself
-                    valueList.add( attribute );
                 }
             }
         }



Mime
View raw message