commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@scalaris.com>
Subject Fwd: svn commit: r1033579 - in /commons/proper/vfs/trunk: sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java
Date Wed, 10 Nov 2010 17:04:50 GMT
Hi Sebb,

--------------- Weitergeleitete Nachricht (Anfang)

Betreff: svn commit: r1033579 - in /commons/proper/vfs/trunk: 
core/src/main/java/org/apache/commons/vfs/provider/webdav/ExceptionConverter.java 
sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java
Absender: sebb-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org
Datum: Wed, 10 Nov 2010 16:39:27 +0000
Newsgruppe: gmane.comp.jakarta.commons.scm

Author: sebb
Date: Wed Nov 10 16:39:27 2010
New Revision: 1033579

URL: http://svn.apache.org/viewvc?rev=1033579&view=rev
Log:
Fix varargs warnings

Modified:
    commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java


Modified: 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java?rev=1033579&r1=1033578&r2=1033579&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java

(original)
+++ 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeAttributesMap.java

Wed Nov 10 16:39:27 2010
@@ -147,7 +147,7 @@ public class MimeAttributesMap implement
 
             try
             {
-                Object value = method.invoke(part, null);
+                Object value = method.invoke(part, (Object[]) null);
                 ret.put(OBJECT_PREFIX + name, value);
             }
             catch (IllegalAccessException e)

--------------- Weitergeleitete Nachricht (Ende)


You could have resolved this also with:

-                Object value = method.invoke(part, null);
+                Object value = method.invoke(part);


Taking advantage of the vararg avoids that nasty cast.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message