directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1213829 - /directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java
Date Tue, 13 Dec 2011 18:28:49 GMT
Author: pamarcelot
Date: Tue Dec 13 18:28:48 2011
New Revision: 1213829

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

Modified:
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java?rev=1213829&r1=1213828&r2=1213829&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaSorter.java
Tue Dec 13 18:28:48 2011
@@ -41,7 +41,10 @@ public class SchemaSorter implements Com
             Schema s1 = ( ( SchemaWrapper ) o1 ).getSchema();
             Schema s2 = ( ( SchemaWrapper ) o2 ).getSchema();
 
-            return s1.getSchemaName().compareToIgnoreCase( s2.getSchemaName() );
+            if ( ( s1 != null ) && ( s2 != null ) )
+            {
+                return s1.getSchemaName().compareToIgnoreCase( s2.getSchemaName() );
+            }
         }
 
         // Default



Mime
View raw message