ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: report: warnings on Solaris9 build.
Date Mon, 31 Jul 2006 15:01:20 GMT
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 <hgs@dmu.ac.uk> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message