directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r596803 - in /directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search: SearchRequestMatchingRuleAssertionTest.java SearchRequestSubstringTest.java
Date Tue, 20 Nov 2007 19:56:56 GMT
Author: felixk
Date: Tue Nov 20 11:56:56 2007
New Revision: 596803

URL: http://svn.apache.org/viewvc?rev=596803&view=rev
Log:
Method invokes toString() method on a String

Calling String.toString() is just a redundant operation. Just use the String.

Modified:
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?rev=596803&r1=596802&r2=596803&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
Tue Nov 20 11:56:56 2007
@@ -376,7 +376,7 @@
         ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) sr.getFilter();
         assertNotNull( extensibleMatchFilter );
 
-        assertEquals( "test", extensibleMatchFilter.getMatchingRule().toString() );
+        assertEquals( "test", extensibleMatchFilter.getMatchingRule() );
         assertNull( extensibleMatchFilter.getType() );
         assertEquals( "", extensibleMatchFilter.getMatchValue().toString() );
         assertFalse( extensibleMatchFilter.isDnAttributes() );

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java?rev=596803&r1=596802&r2=596803&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
Tue Nov 20 11:56:56 2007
@@ -153,8 +153,8 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
-        assertEquals( "t", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
+        assertEquals( "t", substringFilter.getInitialSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -269,8 +269,8 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
-        assertEquals( "t", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
+        assertEquals( "t", substringFilter.getInitialSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -392,7 +392,7 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
         assertEquals( null, substringFilter.getInitialSubstrings() );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 0 ) );
         assertEquals( null, substringFilter.getFinalSubstrings() );
@@ -509,10 +509,10 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
         assertEquals( null, substringFilter.getInitialSubstrings() );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 0 ) );
-        assertEquals( "t", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "t", substringFilter.getFinalSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -627,10 +627,10 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
-        assertEquals( "t", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
+        assertEquals( "t", substringFilter.getInitialSubstrings() );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 0 ) );
-        assertEquals( "t", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "t", substringFilter.getFinalSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -744,8 +744,8 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
-        assertEquals( "t", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
+        assertEquals( "t", substringFilter.getInitialSubstrings() );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 0 ) );
 
         // The attributes
@@ -855,11 +855,11 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
         assertEquals( null, substringFilter.getInitialSubstrings() );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 0 ) );
         assertEquals( "t", substringFilter.getAnySubstrings().get( 1 ) );
-        assertEquals( "t", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "t", substringFilter.getFinalSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -973,8 +973,8 @@
         SubstringFilter substringFilter = ( SubstringFilter ) sr.getFilter();
         assertNotNull( substringFilter );
 
-        assertEquals( "objectclass", substringFilter.getType().toString() );
-        assertEquals( "t", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "objectclass", substringFilter.getType() );
+        assertEquals( "t", substringFilter.getInitialSubstrings() );
         assertEquals( "*", substringFilter.getAnySubstrings().get( 0 ) );
 
         // The attributes
@@ -1212,7 +1212,7 @@
         assertEquals( "objectclass", substringFilter.getType() );
         assertEquals( null, substringFilter.getInitialSubstrings() );
         assertEquals( 0, substringFilter.getAnySubstrings().size() );
-        assertEquals( "Amos", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "Amos", substringFilter.getFinalSubstrings() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();



Mime
View raw message