commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1033571 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
Date Wed, 10 Nov 2010 16:29:30 GMT
Author: sebb
Date: Wed Nov 10 16:29:29 2010
New Revision: 1033571

URL: http://svn.apache.org/viewvc?rev=1033571&view=rev
Log:
Fix up raw types warning

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java?rev=1033571&r1=1033570&r2=1033571&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/sftp/SftpFileObject.java
Wed Nov 10 16:29:29 2010
@@ -298,7 +298,7 @@ public class SftpFileObject extends Abst
     protected FileObject[] doListChildrenResolved() throws Exception
     {
         // List the contents of the folder
-        Vector<LsEntry> vector = null;
+        Vector<?> vector = null;
         final ChannelSftp channel = fileSystem.getChannel();
 
         try
@@ -364,7 +364,8 @@ public class SftpFileObject extends Abst
 
         // Extract the child names
         final ArrayList<FileObject> children = new ArrayList<FileObject>();
-        for (Iterator<LsEntry> iterator = vector.iterator(); iterator.hasNext();)
+        for (@SuppressWarnings("unchecked") // OK because ChannelSftp.ls() is documented
to return Vector<LsEntry>
+            Iterator<LsEntry> iterator = (Iterator<LsEntry>) vector.iterator();
iterator.hasNext();)
         {
             final LsEntry stat = iterator.next();
 



Mime
View raw message