directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r586691 - in /directory/studio/trunk: studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/
Date Sat, 20 Oct 2007 09:46:50 GMT
Author: seelmann
Date: Sat Oct 20 02:46:49 2007
New Revision: 586691

URL: http://svn.apache.org/viewvc?rev=586691&view=rev
Log:
Fixed unchecked warning.

Modified:
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=586691&r1=586690&r2=586691&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
Sat Oct 20 02:46:49 2007
@@ -31,6 +31,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
@@ -195,14 +196,14 @@
      * 
      * @return the naming enumeration or null if an exception occurs.
      */
-    public NamingEnumeration search( final String searchBase, final String filter, final
SearchControls searchControls,
+    public NamingEnumeration<SearchResult> search( final String searchBase, final String
filter, final SearchControls searchControls,
         final String derefAliasMethod, final String handleReferralsMethod, final Control[]
controls,
         final StudioProgressMonitor monitor )
     {
         // start
         InnerRunnable runnable = new InnerRunnable()
         {
-            private NamingEnumeration namingEnumeration = null;
+            private NamingEnumeration<SearchResult> namingEnumeration = null;
             private NamingException namingException = null;
 
 
@@ -276,7 +277,7 @@
         }
         else if ( runnable.getResult() != null && runnable.getResult() instanceof
NamingEnumeration )
         {
-            return ( NamingEnumeration ) runnable.getResult();
+            return ( NamingEnumeration<SearchResult> ) runnable.getResult();
         }
         else
         {

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java?rev=586691&r1=586690&r2=586691&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
Sat Oct 20 02:46:49 2007
@@ -101,7 +101,6 @@
         SearchControls constraintSearch = new SearchControls();
         constraintSearch.setSearchScope( SearchControls.ONELEVEL_SCOPE );
 
-        @SuppressWarnings("unchecked")
         NamingEnumeration<SearchResult> answer = wrapper.search( "ou=schema", "(objectclass=metaSchema)",
             constraintSearch, DEREF_ALIAS_METHOD, HANDLE_REFERALS_METHOD, null, ( StudioProgressMonitor
) monitor );
         if ( answer != null )
@@ -152,7 +151,6 @@
         constraintSearch.setReturningAttributes( new String[]
             { "+" } );
 
-        @SuppressWarnings("unchecked")
         NamingEnumeration<SearchResult> answer = wrapper.search( "", "(objectclass=*)",
constraintSearch,
             DEREF_ALIAS_METHOD, HANDLE_REFERALS_METHOD, null, monitor );
 
@@ -203,7 +201,6 @@
         SearchControls constraintSearch = new SearchControls();
         constraintSearch.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        @SuppressWarnings("unchecked")
         NamingEnumeration<SearchResult> answer = wrapper.search( "cn=" + name + ",
ou=schema", "(objectclass=*)",
             constraintSearch, DEREF_ALIAS_METHOD, HANDLE_REFERALS_METHOD, null, monitor );
         if ( answer != null )



Mime
View raw message