directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r749451 - /directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java
Date Mon, 02 Mar 2009 22:01:43 GMT
Author: szoerner
Date: Mon Mar  2 22:01:42 2009
New Revision: 749451

URL: http://svn.apache.org/viewvc?rev=749451&view=rev
Log:
Formatting, Warnings removed

Modified:
    directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java

Modified: directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java
URL: http://svn.apache.org/viewvc/directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java?rev=749451&r1=749450&r2=749451&view=diff
==============================================================================
--- directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java
(original)
+++ directory/sandbox/szoerner/groovyldap/src/main/java/org/apache/directory/groovyldap/Search.java
Mon Mar  2 22:01:42 2009
@@ -28,7 +28,8 @@
 /**
  * Contains all parameters for an LDAP search. Filled with default values.
  * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ *         Project</a>
  * @version $Rev$, $Date$
  */
 public class Search
@@ -76,13 +77,22 @@
             {
                 Object value = map.get( key );
                 Object[] values = null;
-                if (value instanceof Object[]) {
+                if ( value instanceof Object[] )
+                {
                     values = ( Object[] ) value;
-                } else if (value instanceof Collection) {
-                    Collection c = ( Collection ) value;
+                }
+                else if ( value instanceof Collection )
+                {
+
+                    @SuppressWarnings("unchecked")
+                    Collection<Object> c = ( Collection<Object> ) value;
+
                     values = c.toArray();
-                } else {
-                    values = new Object[] { value };
+                }
+                else
+                {
+                    values = new Object[]
+                        { value };
                 }
                 this.setFilterArgs( values );
             }



Mime
View raw message