ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugh Sasse <...@dmu.ac.uk>
Subject report: warnings on Solaris9 build.
Date Mon, 31 Jul 2006 14:45:32 GMT
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


Mime
View raw message