directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r491698 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
Date Mon, 01 Jan 2007 23:27:29 GMT
Author: elecharny
Date: Mon Jan  1 15:27:27 2007
New Revision: 491698

URL: http://svn.apache.org/viewvc?view=rev&rev=491698
Log:
Removed useless call to toString() method

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?view=diff&rev=491698&r1=491697&r2=491698
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
Mon Jan  1 15:27:27 2007
@@ -439,13 +439,13 @@
                         case LdapConstants.EQUALITY_MATCH_FILTER:
                             if ( ava.getAssertionValue() instanceof String )
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (String)ava.getAssertionValue(), 
                                     AssertionEnum.EQUALITY );
                             }
                             else
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (byte[])ava.getAssertionValue(), 
                                     AssertionEnum.EQUALITY );
                             }
@@ -455,13 +455,13 @@
                         case LdapConstants.GREATER_OR_EQUAL_FILTER:
                             if ( ava.getAssertionValue() instanceof String )
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),
+                                branch = new SimpleNode( ava.getAttributeDesc(),
                                     (String)ava.getAssertionValue(),
                                     AssertionEnum.GREATEREQ );
                             }
                             else
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),
+                                branch = new SimpleNode( ava.getAttributeDesc(),
                                     (byte[])ava.getAssertionValue(),
                                     AssertionEnum.GREATEREQ );
                             }
@@ -471,13 +471,13 @@
                         case LdapConstants.LESS_OR_EQUAL_FILTER:
                             if ( ava.getAssertionValue() instanceof String )
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (String)ava.getAssertionValue(), 
                                     AssertionEnum.LESSEQ );
                             }
                             else
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (byte[])ava.getAssertionValue(), 
                                     AssertionEnum.LESSEQ );
                             }
@@ -487,13 +487,13 @@
                         case LdapConstants.APPROX_MATCH_FILTER:
                             if ( ava.getAssertionValue() instanceof String )
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (String)ava.getAssertionValue(), 
                                     AssertionEnum.APPROXIMATE );
                             }
                             else
                             {
-                                branch = new SimpleNode( ava.getAttributeDesc().toString(),

+                                branch = new SimpleNode( ava.getAttributeDesc(), 
                                     (byte[])ava.getAssertionValue(), 
                                     AssertionEnum.APPROXIMATE );
                             }
@@ -512,26 +512,25 @@
 
                     if ( filter.getInitialSubstrings() != null )
                     {
-                        initialString = filter.getInitialSubstrings().toString();
+                        initialString = filter.getInitialSubstrings();
                     }
 
                     if ( filter.getFinalSubstrings() != null )
                     {
-                        finalString = filter.getFinalSubstrings().toString();
+                        finalString = filter.getFinalSubstrings();
                     }
 
                     if ( filter.getAnySubstrings() != null )
                     {
-                        Iterator iter = filter.getAnySubstrings().iterator();
                         anyString = new ArrayList<String>();
 
-                        while ( iter.hasNext() )
+                        for ( String any:filter.getAnySubstrings() )
                         {
-                            anyString.add( iter.next().toString() );
+                            anyString.add( any );
                         }
                     }
 
-                    branch = new SubstringNode( anyString, filter.getType().toString(), initialString,
finalString );
+                    branch = new SubstringNode( anyString, filter.getType(), initialString,
finalString );
                 }
                 else if ( twixFilter instanceof ExtensibleMatchFilter )
                 {
@@ -542,14 +541,14 @@
 
                     if ( filter.getType() != null )
                     {
-                        attribute = filter.getType().toString();
+                        attribute = filter.getType();
                     }
 
                     Object value = filter.getMatchValue();
 
                     if ( filter.getMatchingRule() != null )
                     {
-                        matchingRule = filter.getMatchingRule().toString();
+                        matchingRule = filter.getMatchingRule();
                     }
 
                     if ( value instanceof String )



Mime
View raw message