ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject [PATCH] compiling with jikes pedantic
Date Sun, 25 Feb 2001 02:18:50 GMT
Hi,

I recently tried to compile Ant from CVS, and got a whole bunch of warnings. Turns out I had
pedantic mode on in my ~/.ant.properties file[1].

Most of the warnings are due to redundant modifiers in public interfaces. Eg, if we have this:

public interface TarConstants {
	public static final int xxxx;
	...
}

Jikes complains

*** Warning: The use of the "public" modifier in this context is redundant and strongly discouraged
as a matter of style.
*** Warning: The use of the "static" modifier in this context is redundant and strongly discouraged
as a matter of style.
*** Warning: The use of the "final" modifier in this context is redundant and strongly discouraged
as a matter of style.

To reproduce:

~/apache/jakarta/jakarta-ant/src/main$ jikes +P  org/apache/tools/tar/TarConstants.java

So I have a request: could someone please:

a) Apply the patches found at http://kenny.socialchange.net.au/~jeff/ant/pedANTic.patch

b) Declare that pedantic mode is not to be used in Ant, and prevent people like me gettings
warnings by modifying build.xml thusly:

Index: build.xml
===================================================================
RCS file: /home/cvspublic/jakarta-ant/build.xml,v
retrieving revision 1.138
diff -u -r1.138 build.xml
--- build.xml	2001/02/23 05:06:58	1.138
+++ build.xml	2001/02/25 00:56:14
@@ -9,6 +9,7 @@
 
   <!-- Give user a chance to override without editing this file 
        (and without typing -D each time it compiles it) -->
+  <property name="build.compiler.pedantic" value="false"/>
   <property file=".ant.properties" />
   <property file="${user.home}/.ant.properties" />



Thanks :)

--Jeff


[1]: Contents of my ~/.ant.properties:

build.compiler=jikes
build.compiler.warnings=true
build.compiler.pedantic=true
build.compiler.depend=true

Mime
View raw message