directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1163232 [1/2] - in /directory/studio/trunk/plugins: connection.core/src/main/java/org/apache/directory/studio/connection/core/ connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ ldapbrowser.common/ ldapbrows...
Date Tue, 30 Aug 2011 14:31:50 GMT
Author: elecharny
Date: Tue Aug 30 14:31:49 2011
New Revision: 1163232

URL: http://svn.apache.org/viewvc?rev=1163232&view=rev
Log:
o Replaced the String.toLowercase( str ) calls by calls to Strings.toLowerCase (cf DIRSERVER-1646)
o Made some of the projects depend on shared-util

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
    directory/studio/trunk/plugins/ldapbrowser.common/pom.xml
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ValueEditorsPreferences.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
    directory/studio/trunk/plugins/ldapbrowser.ui/pom.xml
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java
    directory/studio/trunk/plugins/ldifeditor/pom.xml
    directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsHandler.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/EditAliasesDialog.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEUsedByMandatoryTableContentProvider.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEUsedByOptionalTableContentProvider.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/msad/InPlaceMsAdObjectGuidValueEditor.java
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
    directory/studio/trunk/plugins/valueeditors/src/test/java/org/apache/directory/studio/valueeditors/msad/InPlaceMsAdObjectGuidValueEditorTest.java
    directory/studio/trunk/plugins/valueeditors/src/test/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditorTest.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java Tue Aug 30 14:31:49 2011
@@ -255,7 +255,7 @@ public class Utils
      */
     public static String getSimpleNormalizedUrl( LdapUrl url )
     {
-        return url.getScheme() + ( url.getHost() != null ? url.getHost().toLowerCase() : "" ) + ":" + url.getPort();
+        return url.getScheme() + ( url.getHost() != null ? Strings.toLowerCase( url.getHost() ) : "" ) + ":" + url.getPort();
     }
 
 

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java (original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java Tue Aug 30 14:31:49 2011
@@ -52,6 +52,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.util.DateUtils;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
@@ -289,7 +290,8 @@ public class LdifModificationLogger impl
                 while ( valueEnumeration.hasMore() )
                 {
                     Object o = valueEnumeration.next();
-                    if ( maskedAttributes.contains( attributeName.toLowerCase() ) )
+
+                    if ( maskedAttributes.contains( Strings.toLowerCase( attributeName ) ) )
                     {
                         record.addAttrVal( LdifAttrValLine.create( attributeName, "**********" ) ); //$NON-NLS-1$
                     }
@@ -378,7 +380,7 @@ public class LdifModificationLogger impl
                 while ( valueEnumeration.hasMore() )
                 {
                     Object o = valueEnumeration.next();
-                    if ( maskedAttributes.contains( attributeDescription.toLowerCase() ) )
+                    if ( maskedAttributes.contains( Strings.toLowerCase( attributeDescription ) ) )
                     {
                         modSpec.addAttrVal( LdifAttrValLine.create( attributeDescription, "**********" ) ); //$NON-NLS-1$
                     }
@@ -624,9 +626,10 @@ public class LdifModificationLogger impl
         String maskedAttributeString = ConnectionCorePlugin.getDefault().getPluginPreferences().getString(
             ConnectionCoreConstants.PREFERENCE_MODIFICATIONLOGS_MASKED_ATTRIBUTES );
         String[] splitted = maskedAttributeString.split( "," ); //$NON-NLS-1$
+
         for ( String s : splitted )
         {
-            maskedAttributes.add( s.toLowerCase() );
+            maskedAttributes.add( Strings.toLowerCase( s ) );
         }
 
         return maskedAttributes;

Modified: directory/studio/trunk/plugins/ldapbrowser.common/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/pom.xml?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/pom.xml (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/pom.xml Tue Aug 30 14:31:49 2011
@@ -118,6 +118,7 @@
  org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
  org.apache.commons.lang;bundle-version="${org.apache.commons.lang.version}",
  org.apache.directory.shared.ldap.model;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.shared.util;bundle-version="${org.apache.directory.shared.validversion}",
  org.eclipse.core.runtime,
  org.eclipse.core.expressions,
  org.eclipse.jface.text,
@@ -157,18 +158,26 @@
       <artifactId>org.apache.commons.io</artifactId>
       <scope>provided</scope>
     </dependency>
+    
     <dependency>
       <groupId>org.apache.directory.studio</groupId>
       <artifactId>org.apache.commons.lang</artifactId>
       <scope>provided</scope>
     </dependency>
+    
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-model</artifactId>
       <scope>provided</scope>
     </dependency>
     
-  	<!-- Apache Directory Studio plugins dependencies -->
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-util</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <!-- Apache Directory Studio plugins dependencies -->
     <dependency>
       <groupId>org.apache.directory.studio</groupId>
       <artifactId>common.core</artifactId>

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ValueEditorsPreferences.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ValueEditorsPreferences.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ValueEditorsPreferences.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ValueEditorsPreferences.java Tue Aug 30 14:31:49 2011
@@ -24,6 +24,7 @@ package org.apache.directory.studio.ldap
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeValueEditorRelation;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SyntaxValueEditorRelation;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
@@ -61,7 +62,7 @@ public class ValueEditorsPreferences
             {
                 if ( relations[i].getAttributeNumericOidOrType() != null )
                 {
-                    attributeValueEditorCache.put( relations[i].getAttributeNumericOidOrType().toLowerCase(),
+                    attributeValueEditorCache.put( Strings.toLowerCase( relations[i].getAttributeNumericOidOrType() ),
                         relations[i].getValueEditorClassName() );
                 }
             }
@@ -151,7 +152,7 @@ public class ValueEditorsPreferences
             {
                 if ( relations[i].getSyntaxOID() != null )
                 {
-                    syntaxValueEditorCache.put( relations[i].getSyntaxOID().toLowerCase(), relations[i]
+                    syntaxValueEditorCache.put( Strings.toLowerCase( relations[i].getSyntaxOID() ), relations[i]
                         .getValueEditorClassName() );
                 }
             }

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java Tue Aug 30 14:31:49 2011
@@ -29,6 +29,7 @@ import java.util.List;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.ui.RunnableContextRunner;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
@@ -585,7 +586,7 @@ public class NewEntryObjectclassWizardPa
                 Collection<String> lowerCaseIdentifiers = SchemaUtils.getLowerCaseIdentifiers( ocd );
                 for ( String s : lowerCaseIdentifiers )
                 {
-                    if ( s.toLowerCase().startsWith( filterText.getText().toLowerCase() ) )
+                    if ( Strings.toLowerCase( s ).startsWith( Strings.toLowerCase( filterText.getText() ) ) )
                     {
                         return true;
                     }

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java Tue Aug 30 14:31:49 2011
@@ -31,6 +31,7 @@ import java.util.Set;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
@@ -245,17 +246,17 @@ public class ValueEditorManager
         // check attribute preferences
         Map<String, String> attributeValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
             .getAttributeValueEditorMap();
-        if ( atd.getOid() != null && attributeValueEditorMap.containsKey( atd.getOid().toLowerCase() ) )
+        if ( atd.getOid() != null && attributeValueEditorMap.containsKey( Strings.toLowerCase( atd.getOid() ) ) )
         {
-            return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( atd.getOid()
-                .toLowerCase() ) );
+            return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( Strings.toLowerCase( atd.getOid()
+                 ) ) );
         }
         List<String> names = atd.getNames();
         for ( String name : names )
         {
-            if ( attributeValueEditorMap.containsKey( name.toLowerCase() ) )
+            if ( attributeValueEditorMap.containsKey( Strings.toLowerCase( name ) ) )
             {
-                return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( name.toLowerCase() ) );
+                return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( Strings.toLowerCase( name ) ) );
             }
         }
 
@@ -263,9 +264,9 @@ public class ValueEditorManager
         String syntaxNumericOid = SchemaUtils.getSyntaxNumericOidTransitive( atd, schema );
         Map<String, String> syntaxValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
             .getSyntaxValueEditorMap();
-        if ( syntaxNumericOid != null && syntaxValueEditorMap.containsKey( syntaxNumericOid.toLowerCase() ) )
+        if ( syntaxNumericOid != null && syntaxValueEditorMap.containsKey( Strings.toLowerCase( syntaxNumericOid ) ) )
         {
-            return ( IValueEditor ) class2ValueEditors.get( syntaxValueEditorMap.get( syntaxNumericOid.toLowerCase() ) );
+            return ( IValueEditor ) class2ValueEditors.get( syntaxValueEditorMap.get( Strings.toLowerCase( syntaxNumericOid ) ) );
         }
 
         // return default

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java Tue Aug 30 14:31:49 2011
@@ -42,6 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.url.LdapUrl;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -576,7 +577,7 @@ public class SearchRunnable implements S
                 String[] supportedControls = scAttribute.getStringValues();
                 for ( int i = 0; i < supportedControls.length; i++ )
                 {
-                    supportedConrolSet.add( supportedControls[i].toLowerCase() );
+                    supportedConrolSet.add( Strings.toLowerCase( supportedControls[i] ) );
                 }
             }
 
@@ -584,7 +585,7 @@ public class SearchRunnable implements S
             for ( Iterator<StudioControl> it = controls.iterator(); it.hasNext(); )
             {
                 StudioControl control = it.next();
-                if ( !supportedConrolSet.contains( control.getOid().toLowerCase() ) )
+                if ( !supportedConrolSet.contains( Strings.toLowerCase( control.getOid() ) ) )
                 {
                     it.remove();
                 }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java Tue Aug 30 14:31:49 2011
@@ -31,6 +31,7 @@ import java.util.List;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 
@@ -302,7 +303,7 @@ public class AttributeDescription implem
                 String otherLang = otherIt.next();
                 if ( otherLang.endsWith( "-" ) )
                 {
-                    if ( myLang.toLowerCase().startsWith( otherLang.toLowerCase() ) )
+                    if ( Strings.toLowerCase( myLang ).startsWith( Strings.toLowerCase( otherLang ) ) )
                     {
                         otherIt.remove();
                     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java Tue Aug 30 14:31:49 2011
@@ -31,6 +31,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.url.LdapUrl;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -190,12 +191,12 @@ public abstract class AbstractEntry impl
                 getBrowserConnectionImpl().setAttributeInfo( this, ai );
             }
 
-            if ( ai.attributeMap.containsKey( oidString.toLowerCase() ) )
+            if ( ai.attributeMap.containsKey( Strings.toLowerCase( oidString ) ) )
             {
                 throw new IllegalArgumentException( BrowserCoreMessages.model__attribute_already_exists );
             }
 
-            ai.attributeMap.put( oidString.toLowerCase(), attributeToAdd );
+            ai.attributeMap.put( Strings.toLowerCase( oidString ), attributeToAdd );
         }
 
         entryModified( new AttributeAddedEvent( getBrowserConnectionImpl(), this, attributeToAdd ) );
@@ -222,10 +223,10 @@ public abstract class AbstractEntry impl
             String oidString = attributeToDelete.getAttributeDescription().toOidString(
                 getBrowserConnection().getSchema() );
             AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
-            if ( ai != null && ai.attributeMap != null && ai.attributeMap.containsKey( oidString.toLowerCase() ) )
+            if ( ai != null && ai.attributeMap != null && ai.attributeMap.containsKey( Strings.toLowerCase( oidString ) ) )
             {
-                attributeToDelete = ( IAttribute ) ai.attributeMap.get( oidString.toLowerCase() );
-                ai.attributeMap.remove( oidString.toLowerCase() );
+                attributeToDelete = ( IAttribute ) ai.attributeMap.get( Strings.toLowerCase( oidString ) );
+                ai.attributeMap.remove( Strings.toLowerCase( oidString ) );
                 if ( ai.attributeMap.isEmpty() )
                 {
                     getBrowserConnectionImpl().setAttributeInfo( this, null );
@@ -568,7 +569,7 @@ public abstract class AbstractEntry impl
             }
             else
             {
-                return ( IAttribute ) ai.attributeMap.get( oidString.toLowerCase() );
+                return ( IAttribute ) ai.attributeMap.get( Strings.toLowerCase( oidString ) );
             }
         }
     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java Tue Aug 30 14:31:49 2011
@@ -32,6 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.url.LdapUrl;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
@@ -109,7 +110,7 @@ public class DummyEntry implements IEntr
     public void addAttribute( IAttribute attributeToAdd )
     {
         String oidString = attributeToAdd.getAttributeDescription().toOidString( getBrowserConnection().getSchema() );
-        attributeMap.put( oidString.toLowerCase(), attributeToAdd );
+        attributeMap.put( Strings.toLowerCase( oidString ), attributeToAdd );
         EventRegistry.fireEntryUpdated( new AttributeAddedEvent( attributeToAdd.getEntry().getBrowserConnection(),
             this, attributeToAdd ), this );
     }
@@ -129,7 +130,7 @@ public class DummyEntry implements IEntr
     public void deleteAttribute( IAttribute attributeToDelete )
     {
         String oidString = attributeToDelete.getAttributeDescription().toOidString( getBrowserConnection().getSchema() );
-        attributeMap.remove( oidString.toLowerCase() );
+        attributeMap.remove( Strings.toLowerCase( oidString ) );
         EventRegistry.fireEntryUpdated( new AttributeDeletedEvent( attributeToDelete.getEntry().getBrowserConnection(),
             this, attributeToDelete ), this );
     }
@@ -147,7 +148,7 @@ public class DummyEntry implements IEntr
     {
         AttributeDescription ad = new AttributeDescription( attributeDescription );
         String oidString = ad.toOidString( getBrowserConnection().getSchema() );
-        return attributeMap.get( oidString.toLowerCase() );
+        return attributeMap.get( Strings.toLowerCase( oidString ) );
     }
 
 

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Tue Aug 30 14:31:49 2011
@@ -43,11 +43,12 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
-import org.apache.directory.shared.ldap.model.schema.parsers.*;
+import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.LdapSyntaxDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
 import org.apache.directory.studio.ldifparser.LdifFormatParameters;
@@ -450,13 +451,13 @@ public class Schema
     {
         if ( ocd.getOid() != null )
         {
-            ocdMapByNameOrNumericOid.put( ocd.getOid().toLowerCase(), ocd );
+            ocdMapByNameOrNumericOid.put( Strings.toLowerCase( ocd.getOid() ), ocd );
         }
         if ( ocd.getNames() != null && !ocd.getNames().isEmpty() )
         {
             for ( String ocdName : ocd.getNames() )
             {
-                ocdMapByNameOrNumericOid.put( ocdName.toLowerCase(), ocd );
+                ocdMapByNameOrNumericOid.put( Strings.toLowerCase( ocdName ), ocd );
             }
         }
     }
@@ -486,7 +487,7 @@ public class Schema
     {
         if ( nameOrOid != null )
         {
-            return ocdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() );
+            return ocdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) );
         }
 
         return false;
@@ -504,9 +505,9 @@ public class Schema
      */
     public ObjectClass getObjectClassDescription( String nameOrOid )
     {
-        if ( ocdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
+        if ( ocdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) ) )
         {
-            return ocdMapByNameOrNumericOid.get( nameOrOid.toLowerCase() );
+            return ocdMapByNameOrNumericOid.get( Strings.toLowerCase( nameOrOid ) );
         }
         else if ( !isDefault() )
         {
@@ -536,13 +537,13 @@ public class Schema
     {
         if ( atd.getOid() != null )
         {
-            atdMapByNameOrNumericOid.put( atd.getOid().toLowerCase(), atd );
+            atdMapByNameOrNumericOid.put( Strings.toLowerCase( atd.getOid() ), atd );
         }
         if ( atd.getNames() != null && !atd.getNames().isEmpty() )
         {
             for ( String atdName : atd.getNames() )
             {
-                atdMapByNameOrNumericOid.put( atdName.toLowerCase(), atd );
+                atdMapByNameOrNumericOid.put( Strings.toLowerCase( atdName ), atd );
             }
         }
     }
@@ -572,7 +573,7 @@ public class Schema
     {
         if ( nameOrOid != null )
         {
-            return atdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() );
+            return atdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) );
         }
 
         return false;
@@ -593,9 +594,9 @@ public class Schema
         AttributeDescription ad = new AttributeDescription( nameOrOid );
         String attributeType = ad.getParsedAttributeType();
 
-        if ( atdMapByNameOrNumericOid.containsKey( attributeType.toLowerCase() ) )
+        if ( atdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( attributeType ) ) )
         {
-            return atdMapByNameOrNumericOid.get( attributeType.toLowerCase() );
+            return atdMapByNameOrNumericOid.get( Strings.toLowerCase( attributeType ) );
         }
         else if ( !isDefault() )
         {
@@ -627,7 +628,7 @@ public class Schema
     {
         if ( lsd.getOid() != null )
         {
-            lsdMapByNumericOid.put( lsd.getOid().toLowerCase(), lsd );
+            lsdMapByNumericOid.put( Strings.toLowerCase( lsd.getOid() ), lsd );
         }
     }
 
@@ -655,7 +656,7 @@ public class Schema
     {
         if ( numericOid != null )
         {
-            return lsdMapByNumericOid.containsKey( numericOid.toLowerCase() );
+            return lsdMapByNumericOid.containsKey( Strings.toLowerCase( numericOid ) );
         }
 
         return false;
@@ -676,9 +677,9 @@ public class Schema
         {
             return DUMMY_LDAP_SYNTAX;
         }
-        else if ( lsdMapByNumericOid.containsKey( numericOid.toLowerCase() ) )
+        else if ( lsdMapByNumericOid.containsKey( Strings.toLowerCase( numericOid ) ) )
         {
-            return lsdMapByNumericOid.get( numericOid.toLowerCase() );
+            return lsdMapByNumericOid.get( Strings.toLowerCase( numericOid ) );
         }
         else if ( !isDefault() )
         {
@@ -705,13 +706,13 @@ public class Schema
     {
         if ( mrd.getOid() != null )
         {
-            mrdMapByNameOrNumericOid.put( mrd.getOid().toLowerCase(), mrd );
+            mrdMapByNameOrNumericOid.put( Strings.toLowerCase( mrd.getOid() ), mrd );
         }
         if ( mrd.getNames() != null && !mrd.getNames().isEmpty() )
         {
             for ( String mrdName : mrd.getNames() )
             {
-                mrdMapByNameOrNumericOid.put( mrdName.toLowerCase(), mrd );
+                mrdMapByNameOrNumericOid.put( Strings.toLowerCase( mrdName ), mrd );
             }
         }
     }
@@ -741,7 +742,7 @@ public class Schema
     {
         if ( nameOrOid != null )
         {
-            return mrdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() );
+            return mrdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) );
         }
 
         return false;
@@ -759,9 +760,9 @@ public class Schema
      */
     public MatchingRule getMatchingRuleDescription( String nameOrOid )
     {
-        if ( mrdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
+        if ( mrdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) ) )
         {
-            return mrdMapByNameOrNumericOid.get( nameOrOid.toLowerCase() );
+            return mrdMapByNameOrNumericOid.get( Strings.toLowerCase( nameOrOid ) );
         }
         else if ( !isDefault() )
         {
@@ -788,13 +789,13 @@ public class Schema
     {
         if ( mrud.getOid() != null )
         {
-            mrudMapByNameOrNumericOid.put( mrud.getOid().toLowerCase(), mrud );
+            mrudMapByNameOrNumericOid.put( Strings.toLowerCase( mrud.getOid() ), mrud );
         }
         if ( mrud.getNames() != null && !mrud.getNames().isEmpty() )
         {
             for ( String mrudName : mrud.getNames() )
             {
-                mrudMapByNameOrNumericOid.put( mrudName.toLowerCase(), mrud );
+                mrudMapByNameOrNumericOid.put( Strings.toLowerCase( mrudName ), mrud );
             }
         }
     }
@@ -825,7 +826,7 @@ public class Schema
     {
         if ( nameOrOid != null )
         {
-            return mrudMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() );
+            return mrudMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) );
         }
 
         return false;
@@ -843,9 +844,9 @@ public class Schema
      */
     public MatchingRuleUse getMatchingRuleUseDescription( String nameOrOid )
     {
-        if ( mrudMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
+        if ( mrudMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) ) )
         {
-            return mrudMapByNameOrNumericOid.get( nameOrOid.toLowerCase() );
+            return mrudMapByNameOrNumericOid.get( Strings.toLowerCase( nameOrOid ) );
         }
         else if ( !isDefault() )
         {

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java Tue Aug 30 14:31:49 2011
@@ -39,6 +39,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -59,91 +60,91 @@ public class SchemaUtils
     public static final Set<String> OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES = new HashSet<String>();
     static
     {
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_CSN_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.OBJECT_CLASSES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.OBJECT_CLASSES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ATTRIBUTE_TYPES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ATTRIBUTE_TYPES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.LDAP_SYNTAXES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.LDAP_SYNTAXES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MATCHING_RULES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MATCHING_RULES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MATCHING_RULE_USE_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MATCHING_RULE_USE_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.DIT_CONTENT_RULES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.DIT_CONTENT_RULES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.DIT_STRUCTURE_RULES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.DIT_STRUCTURE_RULES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NAME_FORMS_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NAME_FORMS_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NUM_SUBORDINATES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBORDINATE_COUNT_AT.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT_OID.toLowerCase() );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATE_TIMESTAMP_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATE_TIMESTAMP_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATORS_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATORS_NAME_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFY_TIMESTAMP_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFY_TIMESTAMP_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFIERS_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFIERS_NAME_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_UUID_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_UUID_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_CSN_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_DN_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_DN_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.OBJECT_CLASSES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.OBJECT_CLASSES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ATTRIBUTE_TYPES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ATTRIBUTE_TYPES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.LDAP_SYNTAXES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.LDAP_SYNTAXES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MATCHING_RULES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MATCHING_RULES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MATCHING_RULE_USE_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MATCHING_RULE_USE_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.DIT_CONTENT_RULES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.DIT_CONTENT_RULES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.DIT_STRUCTURE_RULES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.DIT_STRUCTURE_RULES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.NAME_FORMS_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.NAME_FORMS_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.HAS_SUBORDINATES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.HAS_SUBORDINATES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.NUM_SUBORDINATES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBORDINATE_COUNT_AT ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_NAME_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_VERSION_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_VERSION_AT_OID ) );
     }
 
     /** The well-known non-modifiable attributes */
     public static final Set<String> NON_MODIFIABLE_ATTRIBUTE_OIDS_AND_NAMES = new HashSet<String>();
     static
     {
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_CSN_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT_OID.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NUM_SUBORDINATES_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBORDINATE_COUNT_AT.toLowerCase() );
-
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT_OID.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT.toLowerCase() );
-        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT_OID.toLowerCase() );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATE_TIMESTAMP_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATE_TIMESTAMP_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATORS_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.CREATORS_NAME_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFY_TIMESTAMP_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFY_TIMESTAMP_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFIERS_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.MODIFIERS_NAME_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_UUID_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_UUID_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_CSN_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_DN_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.ENTRY_DN_AT_OID ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.HAS_SUBORDINATES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.HAS_SUBORDINATES_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.NUM_SUBORDINATES_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.SUBORDINATE_COUNT_AT ) );
+
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_NAME_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_NAME_AT_OID ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_VERSION_AT ) );
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( Strings.toLowerCase( SchemaConstants.VENDOR_VERSION_AT_OID ) );
     }
 
     private static final Comparator<String> nameAndOidComparator = new Comparator<String>()
@@ -234,7 +235,7 @@ public class SchemaUtils
         Set<String> identiers = new HashSet<String>();
         if ( asd.getOid() != null )
         {
-            identiers.add( asd.getOid().toLowerCase() );
+            identiers.add( Strings.toLowerCase( asd.getOid() ) );
         }
         if ( asd.getNames() != null && !asd.getNames().isEmpty() )
         {
@@ -242,7 +243,7 @@ public class SchemaUtils
             {
                 if ( name != null )
                 {
-                    identiers.add( name.toLowerCase() );
+                    identiers.add( Strings.toLowerCase( name ) );
                 }
             }
         }
@@ -520,7 +521,7 @@ public class SchemaUtils
         {
             String syntax = getSyntaxNumericOidTransitive( atd, schema );
             if ( syntax != null && lsd.getOid() != null
-                && syntax.toLowerCase().equals( lsd.getOid().toLowerCase() ) )
+                && Strings.toLowerCase( syntax ).equals( Strings.toLowerCase( lsd.getOid() ) ) )
             {
                 usedFroms.add( atd );
             }
@@ -548,15 +549,15 @@ public class SchemaUtils
             String emr = getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema );
             String smr = getSubstringMatchingRuleNameOrNumericOidTransitive( atd, schema );
             String omr = getOrderingMatchingRuleNameOrNumericOidTransitive( atd, schema );
-            if ( emr != null && lowerCaseIdentifiers.contains( emr.toLowerCase() ) )
+            if ( emr != null && lowerCaseIdentifiers.contains( Strings.toLowerCase( emr ) ) )
             {
                 usedFromSet.add( atd );
             }
-            if ( smr != null && lowerCaseIdentifiers.contains( smr.toLowerCase() ) )
+            if ( smr != null && lowerCaseIdentifiers.contains( Strings.toLowerCase( smr ) ) )
             {
                 usedFromSet.add( atd );
             }
-            if ( omr != null && lowerCaseIdentifiers.contains( omr.toLowerCase() ) )
+            if ( omr != null && lowerCaseIdentifiers.contains( Strings.toLowerCase( omr ) ) )
             {
                 usedFromSet.add( atd );
             }
@@ -744,7 +745,7 @@ public class SchemaUtils
         for ( AttributeType derivedAtd : schema.getAttributeTypeDescriptions() )
         {
             String superType = derivedAtd.getSuperiorOid();
-            if ( superType != null && getLowerCaseIdentifiers( atd ).contains( superType.toLowerCase() ) )
+            if ( superType != null && getLowerCaseIdentifiers( atd ).contains( Strings.toLowerCase( superType ) ) )
             {
                 derivedAtds.add( derivedAtd );
             }
@@ -932,7 +933,7 @@ public class SchemaUtils
         {
             for ( String name : names )
             {
-                set.add( name.toLowerCase() );
+                set.add( Strings.toLowerCase( name ) );
             }
         }
         return set;

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java Tue Aug 30 14:31:49 2011
@@ -40,6 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.url.LdapUrl;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
@@ -128,7 +129,7 @@ public class Utils
     {
         String oid = schema != null ? schema.getAttributeTypeDescription( ava.getNormType() ).getOid() : ava
             .getNormType();
-        return oid.trim().toLowerCase() + "=" + ava.getUpValue().getString().trim().toLowerCase(); //$NON-NLS-1$
+        return Strings.toLowerCase( Strings.trim( oid ) ) + "=" + Strings.toLowerCase( Strings.trim( ava.getUpValue().getString() ) ); //$NON-NLS-1$
     }
 
 

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/pom.xml?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/pom.xml (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/pom.xml Tue Aug 30 14:31:49 2011
@@ -119,6 +119,7 @@
             <Require-Bundle>org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
  org.apache.commons.lang;bundle-version="${org.apache.commons.lang.version}",
  org.apache.directory.shared.ldap.model;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.shared.util;bundle-version="${org.apache.directory.shared.validversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
@@ -171,6 +172,11 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-util</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.directory.studio</groupId>
       <artifactId>org.apache.commons.io</artifactId>
       <scope>provided</scope>

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java Tue Aug 30 14:31:49 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -224,9 +225,9 @@ public class AttributeTypeDescriptionPag
             if ( element instanceof AttributeType )
             {
                 AttributeType atd = ( AttributeType ) element;
-                boolean matched = SchemaUtils.toString( atd ).toLowerCase()
-                    .indexOf( filterText.getText().toLowerCase() ) != -1
-                    || atd.getOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
+                boolean matched = Strings.toLowerCase( SchemaUtils.toString( atd ) )
+                    .indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1
+                    || Strings.toLowerCase( atd.getOid() ).indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1;
                 return matched;
             }
             return false;

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java Tue Aug 30 14:31:49 2011
@@ -22,6 +22,7 @@ package org.apache.directory.studio.ldap
 
 
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -223,9 +224,9 @@ public class LdapSyntaxDescriptionPage e
             if ( element instanceof LdapSyntax )
             {
                 LdapSyntax lsd = ( LdapSyntax ) element;
-                boolean matched = SchemaUtils.toString( lsd ).toLowerCase()
-                    .indexOf( filterText.getText().toLowerCase() ) != -1
-                    || lsd.getOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
+                boolean matched = Strings.toLowerCase( SchemaUtils.toString( lsd ) )
+                    .indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1
+                    || Strings.toLowerCase( lsd.getOid() ).indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1;
                 return matched;
             }
             return false;

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java Tue Aug 30 14:31:49 2011
@@ -22,6 +22,7 @@ package org.apache.directory.studio.ldap
 
 
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -223,9 +224,9 @@ public class MatchingRuleDescriptionPage
             if ( element instanceof MatchingRule )
             {
                 MatchingRule mrd = ( MatchingRule ) element;
-                boolean matched = SchemaUtils.toString( mrd ).toLowerCase()
-                    .indexOf( filterText.getText().toLowerCase() ) != -1
-                    || mrd.getOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
+                boolean matched = Strings.toLowerCase( SchemaUtils.toString( mrd ) )
+                    .indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1
+                    || Strings.toLowerCase( mrd.getOid() ).indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1;
                 return matched;
             }
             return false;

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java Tue Aug 30 14:31:49 2011
@@ -22,6 +22,7 @@ package org.apache.directory.studio.ldap
 
 
 import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -224,9 +225,9 @@ public class MatchingRuleUseDescriptionP
             if ( element instanceof MatchingRuleUse )
             {
                 MatchingRuleUse mrud = ( MatchingRuleUse ) element;
-                boolean matched = SchemaUtils.toString( mrud ).toLowerCase().indexOf(
-                    filterText.getText().toLowerCase() ) != -1
-                    || mrud.getOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
+                boolean matched = Strings.toLowerCase( SchemaUtils.toString( mrud ) ).indexOf(
+                    Strings.toLowerCase( filterText.getText() ) ) != -1
+                    || Strings.toLowerCase( mrud.getOid() ).indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1;
                 return matched;
             }
             return false;

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java Tue Aug 30 14:31:49 2011
@@ -22,6 +22,7 @@ package org.apache.directory.studio.ldap
 
 
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -223,9 +224,9 @@ public class ObjectClassDescriptionPage 
             if ( element instanceof ObjectClass )
             {
                 ObjectClass ocd = ( ObjectClass ) element;
-                boolean matched = SchemaUtils.toString( ocd ).toLowerCase()
-                    .indexOf( filterText.getText().toLowerCase() ) != -1
-                    || ocd.getOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
+                boolean matched = Strings.toLowerCase( SchemaUtils.toString( ocd ) )
+                    .indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1
+                    || Strings.toLowerCase( ocd.getOid() ).indexOf( Strings.toLowerCase( filterText.getText() ) ) != -1;
                 return matched;
             }
             return false;

Modified: directory/studio/trunk/plugins/ldifeditor/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/pom.xml?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/pom.xml (original)
+++ directory/studio/trunk/plugins/ldifeditor/pom.xml Tue Aug 30 14:31:49 2011
@@ -115,6 +115,7 @@
             <Bundle-Activator>org.apache.directory.studio.ldifeditor.LdifEditorActivator</Bundle-Activator>
             <Require-Bundle>
  org.apache.directory.shared.ldap.model;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.shared.util;bundle-version="${org.apache.directory.shared.validversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
@@ -166,6 +167,11 @@
       <artifactId>shared-ldap-model</artifactId>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-util</artifactId>
+      <scope>provided</scope>
+    </dependency>
 
     <!-- Apache Directory Studio library plugins dependencies -->
     <!-- Apache Directory Studio plugins dependencies -->

Modified: directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java (original)
+++ directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java Tue Aug 30 14:31:49 2011
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
@@ -46,7 +47,6 @@ import org.apache.directory.studio.ldifp
 import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
 import org.apache.directory.studio.ldifparser.model.lines.LdifChangeTypeLine;
 import org.apache.directory.studio.ldifparser.model.lines.LdifSepLine;
-
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
@@ -229,7 +229,7 @@ public class LdifCompletionProcessor ext
                     for ( String attributeName : attributeNames )
                     {
                         if ( rawAttributeDescription.length() == 0
-                            || attributeName.toLowerCase().startsWith( rawAttributeDescription.toLowerCase() ) )
+                            || Strings.toLowerCase( attributeName ).startsWith( Strings.toLowerCase( rawAttributeDescription ) ) )
                         {
 
                             String proposal = attributeName;

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsHandler.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsHandler.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsHandler.java Tue Aug 30 14:31:49 2011
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.collections.map.MultiValueMap;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.schemaeditor.model.Project;
 import org.apache.directory.studio.schemaeditor.model.Project.ProjectState;
 
@@ -96,7 +97,7 @@ public class ProjectsHandler
     public void addProject( Project project )
     {
         projectsList.add( project );
-        projectsMap.put( project.getName().toLowerCase(), project );
+        projectsMap.put( Strings.toLowerCase( project.getName() ), project );
 
         notifyProjectAdded( project );
     }
@@ -111,7 +112,7 @@ public class ProjectsHandler
     public void removeProject( Project project )
     {
         projectsList.remove( project );
-        projectsMap.remove( project.getName().toLowerCase() );
+        projectsMap.remove( Strings.toLowerCase( project.getName() ) );
 
         notifyProjectRemoved( project );
     }
@@ -127,7 +128,7 @@ public class ProjectsHandler
      */
     public Project getProject( String name )
     {
-        return projectsMap.get( name.toLowerCase() );
+        return projectsMap.get( Strings.toLowerCase( name ) );
     }
 
 
@@ -153,9 +154,9 @@ public class ProjectsHandler
      */
     public void renameProject( Project project, String name )
     {
-        projectsMap.remove( project.getName().toLowerCase() );
+        projectsMap.remove( Strings.toLowerCase( project.getName() ) );
         project.setName( name );
-        projectsMap.put( name.toLowerCase(), project );
+        projectsMap.put( Strings.toLowerCase( name ), project );
 
         notifyProjectRenamed( project );
     }
@@ -171,7 +172,7 @@ public class ProjectsHandler
      */
     public boolean isProjectNameAlreadyTaken( String name )
     {
-        return projectsMap.containsKey( name.toLowerCase() );
+        return projectsMap.containsKey( Strings.toLowerCase( name ) );
     }
 
 

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java Tue Aug 30 14:31:49 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.schemaeditor.model.Schema;
 
 
@@ -177,7 +178,7 @@ public class SchemaHandler
      */
     public AttributeType getAttributeType( String id )
     {
-        List<?> list = getAttributeTypeList( id.toLowerCase() );
+        List<?> list = getAttributeTypeList( Strings.toLowerCase( id ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
@@ -200,7 +201,7 @@ public class SchemaHandler
      */
     public List<?> getAttributeTypeList( String id )
     {
-        return ( List<?> ) attributeTypesMap.get( id.toLowerCase() );
+        return ( List<?> ) attributeTypesMap.get( Strings.toLowerCase( id ) );
     }
 
 
@@ -214,7 +215,7 @@ public class SchemaHandler
      */
     public MatchingRule getMatchingRule( String id )
     {
-        List<?> list = getMatchingRuleList( id.toLowerCase() );
+        List<?> list = getMatchingRuleList( Strings.toLowerCase( id ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
@@ -237,7 +238,7 @@ public class SchemaHandler
      */
     public List<?> getMatchingRuleList( String id )
     {
-        return ( List<?> ) matchingRulesMap.get( id.toLowerCase() );
+        return ( List<?> ) matchingRulesMap.get( Strings.toLowerCase( id ) );
     }
 
 
@@ -251,7 +252,7 @@ public class SchemaHandler
      */
     public ObjectClass getObjectClass( String id )
     {
-        List<?> list = getObjectClassList( id.toLowerCase() );
+        List<?> list = getObjectClassList( Strings.toLowerCase( id ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
@@ -274,7 +275,7 @@ public class SchemaHandler
      */
     public List<?> getObjectClassList( String id )
     {
-        return ( List<?> ) objectClassesMap.get( id.toLowerCase() );
+        return ( List<?> ) objectClassesMap.get( Strings.toLowerCase( id ) );
     }
 
 
@@ -288,7 +289,7 @@ public class SchemaHandler
      */
     public Schema getSchema( String name )
     {
-        List<?> list = getSchemaList( name.toLowerCase() );
+        List<?> list = getSchemaList( Strings.toLowerCase( name ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
@@ -311,7 +312,7 @@ public class SchemaHandler
      */
     public List<?> getSchemaList( String name )
     {
-        return ( List<?> ) schemasMap.get( name.toLowerCase() );
+        return ( List<?> ) schemasMap.get( Strings.toLowerCase( name ) );
     }
 
 
@@ -325,7 +326,7 @@ public class SchemaHandler
      */
     public LdapSyntax getSyntax( String id )
     {
-        List<?> list = getSyntaxList( id.toLowerCase() );
+        List<?> list = getSyntaxList( Strings.toLowerCase( id ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
@@ -348,7 +349,7 @@ public class SchemaHandler
      */
     public List<?> getSyntaxList( String id )
     {
-        return ( List<?> ) syntaxesMap.get( id.toLowerCase() );
+        return ( List<?> ) syntaxesMap.get( Strings.toLowerCase( id ) );
     }
 
 
@@ -482,7 +483,7 @@ public class SchemaHandler
     {
         // Adding the schema
         schemasList.add( schema );
-        schemasMap.put( schema.getSchemaName().toLowerCase(), schema );
+        schemasMap.put( Strings.toLowerCase( schema.getSchemaName() ), schema );
 
         // Adding its attribute types
         for ( AttributeType at : schema.getAttributeTypes() )
@@ -529,7 +530,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    attributeTypesMap.put( name.toLowerCase(), at );
+                    attributeTypesMap.put( Strings.toLowerCase( name ), at );
                 }
             }
             attributeTypesMap.put( at.getOid(), at );
@@ -543,7 +544,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    matchingRulesMap.put( name.toLowerCase(), mr );
+                    matchingRulesMap.put( Strings.toLowerCase( name ), mr );
                 }
             }
             matchingRulesMap.put( mr.getOid(), mr );
@@ -557,7 +558,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    objectClassesMap.put( name.toLowerCase(), oc );
+                    objectClassesMap.put( Strings.toLowerCase( name ), oc );
                 }
             }
             objectClassesMap.put( oc.getOid(), oc );
@@ -571,7 +572,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    syntaxesMap.put( name.toLowerCase(), syntax );
+                    syntaxesMap.put( Strings.toLowerCase( name ), syntax );
                 }
             }
             syntaxesMap.put( syntax.getOid(), syntax );
@@ -589,7 +590,7 @@ public class SchemaHandler
     {
         // Removing the schema
         schemasList.remove( schema );
-        schemasMap.remove( schema.getSchemaName().toLowerCase() );
+        schemasMap.remove( Strings.toLowerCase( schema.getSchemaName() ) );
 
         // Removing its attribute types
         for ( AttributeType at : schema.getAttributeTypes() )
@@ -636,7 +637,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    attributeTypesMap.remove( name.toLowerCase() );
+                    attributeTypesMap.remove( Strings.toLowerCase( name ) );
                 }
             }
             attributeTypesMap.remove( at.getOid() );
@@ -650,7 +651,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    matchingRulesMap.remove( name.toLowerCase() );
+                    matchingRulesMap.remove( Strings.toLowerCase( name ) );
                 }
             }
             matchingRulesMap.remove( mr.getOid() );
@@ -664,7 +665,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    objectClassesMap.remove( name.toLowerCase() );
+                    objectClassesMap.remove( Strings.toLowerCase( name ) );
                 }
             }
             objectClassesMap.remove( oc.getOid() );
@@ -678,7 +679,7 @@ public class SchemaHandler
             {
                 for ( String name : names )
                 {
-                    syntaxesMap.remove( name.toLowerCase() );
+                    syntaxesMap.remove( Strings.toLowerCase( name ) );
                 }
             }
             syntaxesMap.remove( syntax.getOid() );
@@ -1219,7 +1220,7 @@ public class SchemaHandler
      */
     public boolean isAliasOrOidAlreadyTaken( String id )
     {
-        String lowerCasedId = id.toLowerCase();
+        String lowerCasedId = Strings.toLowerCase( id );
         if ( attributeTypesMap.containsKey( lowerCasedId ) )
         {
             return true;
@@ -1251,6 +1252,6 @@ public class SchemaHandler
      */
     public boolean isSchemaNameAlreadyTaken( String name )
     {
-        return schemasMap.containsKey( name.toLowerCase() );
+        return schemasMap.containsKey( Strings.toLowerCase( name ) );
     }
 }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java?rev=1163232&r1=1163231&r2=1163232&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java Tue Aug 30 14:31:49 2011
@@ -29,6 +29,7 @@ import java.util.Map;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
 import org.apache.directory.studio.schemaeditor.controller.SchemaHandler;
@@ -161,7 +162,7 @@ public class DeleteSchemaElementAction e
                     if ( selectedItem instanceof SchemaWrapper )
                     {
                         Schema schema = ( ( SchemaWrapper ) selectedItem ).getSchema();
-                        schemasMap.put( schema.getSchemaName().toLowerCase(), schema );
+                        schemasMap.put( Strings.toLowerCase( schema.getSchemaName() ), schema );
                     }
                     else if ( selectedItem instanceof AttributeTypeWrapper )
                     {
@@ -179,7 +180,7 @@ public class DeleteSchemaElementAction e
                 // Removing schema objects
                 for ( SchemaObject schemaObject : schemaObjectsList )
                 {
-                    if ( !schemasMap.containsKey( schemaObject.getSchemaName().toLowerCase() ) )
+                    if ( !schemasMap.containsKey( Strings.toLowerCase( schemaObject.getSchemaName() ) ) )
                     {
                         // If the schema object is not part of deleted schema, we need to delete it.
                         // But, we don't delete schema objects that are part of a deleted schema, since



Mime
View raw message