Thanks. These are JDK 1.5+ specific, so it's SUN who introduced the
ambiguity, but it generates the proper code. We'll fix them
eventually, if that's not already done in SVN head. --DD
On 7/31/06, Hugh Sasse <[EMAIL PROTECTED]> wrote:
Just to let someone know, I got these warnings building 1.6.5 on Solaris9
src/main/org/apache/tools/zip/ZipEntry.java:425: warning: non-varargs call of
varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
setCompressedSizeMethod.invoke(ze, s);
^
src/main/org/apache/tools/ant/AntClassLoader.java:521: warning: non-varargs
call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
cons[0].newInstance(strs);
^
src/main/org/apache/tools/ant/Diagnostics.java:134: warning: non-varargs call
of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
Object pkg = method.invoke(clazz, null);
^
src/main/org/apache/tools/ant/Diagnostics.java:138: warning: non-varargs call
of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
Object version = method.invoke(pkg, null);
^
src/main/org/apache/tools/ant/TaskAdapter.java:56: warning: non-varargs call of
varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
final Method executeM = taskClass.getMethod("execute", null);
^
src/main/org/apache/tools/ant/TaskAdapter.java:123: warning: non-varargs call
of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
executeM.invoke(proxy, null);
^
src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java:178: warning:
non-varargs call of varargs method with inexact argument type for last
parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
(Reader) constructors[j].newInstance(rdr);
^
Note: * uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7 warnings
brains hgs 43 %> echo $JAVA_HOME
/usr/jdk1.5.0_02
brains hgs 44 %>
I'm pretty new to using Java, and with it being cross platform this
may be well known and of no consequence. (The remark about
deprecation suggests this may be deliberate for backwards
compatibility.) Nonetheless, there's a school of thought that
"warnings are errors", so I report this in the hope it is of use to
someone.
Thank you,
Hugh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]