You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/02/28 18:16:36 UTC
svn commit: r917206 -
/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
Author: seelmann
Date: Sun Feb 28 17:16:35 2010
New Revision: 917206
URL: http://svn.apache.org/viewvc?rev=917206&view=rev
Log:
formatting
Modified:
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java?rev=917206&r1=917205&r2=917206&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java Sun Feb 28 17:16:35 2010
@@ -73,7 +73,7 @@
LdapContext schemaRoot = getSchemaContext( service );
Attributes nisAttrs = schemaRoot.getAttributes( "cn=nis" );
boolean isNisDisabled = false;
-
+
if ( nisAttrs.get( "m-disabled" ) != null )
{
isNisDisabled = ( ( String ) nisAttrs.get( "m-disabled" ).get() ).equalsIgnoreCase( "TRUE" );
@@ -83,14 +83,14 @@
if ( isNisDisabled )
{
Attribute disabled = new BasicAttribute( "m-disabled" );
- ModificationItem[] mods = new ModificationItem[] {
- new ModificationItem( DirContext.REMOVE_ATTRIBUTE, disabled ) };
+ ModificationItem[] mods = new ModificationItem[]
+ { new ModificationItem( DirContext.REMOVE_ATTRIBUTE, disabled ) };
schemaRoot.modifyAttributes( "cn=nis", mods );
}
Partition systemPartition = service.getSystemPartition();
- Set<Index<?,ServerEntry>> indexedAtributes = ( ( JdbmPartition ) systemPartition ).getIndexedAttributes();
- indexedAtributes.add( new JdbmIndex<String,ServerEntry>( "gidNumber" ) );
+ Set<Index<?, ServerEntry>> indexedAtributes = ( ( JdbmPartition ) systemPartition ).getIndexedAttributes();
+ indexedAtributes.add( new JdbmIndex<String, ServerEntry>( "gidNumber" ) );
// -------------------------------------------------------------------
// Add a bunch of nis groups
@@ -110,10 +110,10 @@
attrs.get( "objectClass" ).add( "posixGroup" );
attrs.put( "cn", name );
attrs.put( "gidNumber", String.valueOf( gid ) );
- return getSystemContext( service ).createSubcontext( "cn="+name+",ou=groups", attrs );
+ return getSystemContext( service ).createSubcontext( "cn=" + name + ",ou=groups", attrs );
}
-
-
+
+
/**
* Convenience method that performs a one level search using the
* specified filter returning their DNs as Strings in a set.
@@ -133,7 +133,7 @@
Set<String> results = new HashSet<String>();
NamingEnumeration<SearchResult> list = getSystemContext( service ).search( "ou=groups", filter, controls );
- while( list.hasMore() )
+ while ( list.hasMore() )
{
SearchResult result = list.next();
results.add( result.getName() );
@@ -201,7 +201,7 @@
assertFalse( results.contains( "cn=testGroup5,ou=groups,ou=system" ) );
}
-
+
@Test
public void testGreaterThanSearchWithIndices() throws Exception
{