directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r581274 - /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
Date Tue, 02 Oct 2007 15:18:01 GMT
Author: pamarcelot
Date: Tue Oct  2 08:18:01 2007
New Revision: 581274

URL: http://svn.apache.org/viewvc?rev=581274&view=rev
Log:
Fix for DIRSTUDIO-213 (NullPointerException raised when selecting an OC with no alias as a
superior in the NewObjectClassWizard).

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java?rev=581274&r1=581273&r2=581274&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
Tue Oct  2 08:18:01 2007
@@ -311,7 +311,16 @@
         List<String> names = new ArrayList<String>();
         for ( ObjectClassImpl oc : superiorsList )
         {
-            names.add( oc.getName() );
+            String[] aliases = oc.getNames();
+
+            if ( ( aliases != null ) && ( aliases.length > 0 ) )
+            {
+                names.add( aliases[0] );
+            }
+            else
+            {
+                names.add( oc.getOid() );
+            }
         }
 
         return names.toArray( new String[0] );



Mime
View raw message