commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1033578 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
Date Wed, 10 Nov 2010 16:37:08 GMT
Author: sebb
Date: Wed Nov 10 16:37:08 2010
New Revision: 1033578

URL: http://svn.apache.org/viewvc?rev=1033578&view=rev
Log:
Fix up type warnings

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=1033578&r1=1033577&r2=1033578&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
Wed Nov 10 16:37:08 2010
@@ -292,6 +292,7 @@ public class WebdavFileObject extends Ht
             URLFileName fileName = (URLFileName) getName();
             DavPropertySet properties = getProperties(fileName, PropFindMethod.PROPFIND_ALL_PROP,
                     new DavPropertyNameSet(), false);
+            @SuppressWarnings("unchecked") // iterator() is documented to return DavProperty
instances
             Iterator<DavProperty> iter = properties.iterator();
             while (iter.hasNext())
             {
@@ -299,10 +300,11 @@ public class WebdavFileObject extends Ht
                 attributes.put(property.getName().toString(), property.getValue());
             }
             properties = getPropertyNames(fileName);
-            iter = properties.iterator();
-            while (iter.hasNext())
+            @SuppressWarnings("unchecked") // iterator() is documented to return DavProperty
instances
+            Iterator<DavProperty> iter2 = properties.iterator();
+            while (iter2.hasNext())
             {
-                DavProperty property = iter.next();
+                DavProperty property = iter2.next();
                 if (!attributes.containsKey(property.getName()))
                 {
                     property = getProperty(fileName, property.getName());



Mime
View raw message