ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NonySingh <>
Subject Generics code Compile in Eclipse 3.4 , compilation fails in ANT1.7 (JRE 1.6.0_07)
Date Mon, 06 Apr 2009 07:44:37 GMT

Hi Experts

I am seeking help from you guys for my below problem.

I have following classes :

Class TestAntError
public class TestANtError {

final protected>  void add(final K setDS) throws Exception {
		//synchronized final protected  void add(final K setDS) throws Exception {
			if(setDS == null) {
				throw new NullPointerException("setDS cannot be null !!");
			K thisSetDS =(K) new SetDS();


Class SetDS
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class SetDS, T extends Comparable> {

	private Map vecMap_ = new TreeMap();
	final public boolean add(SetDS rhs) {
		if(rhs == null) {
			throw new NullPointerException("rhs cannot be null !!");
		return false;
	public SetDS()

In Eclipse IT compiles fine with just warnings but when I try to build it
with ANT Build fails with following error. add(SetDS) in SetDS cannot 
be applied to (K)
    [javac] 			thisSetDS.add(setDS);
    [javac] 			         ^
    [javac] 1 error

I am not sure whats the problem. 

Please help.


View this message in context:
Sent from the Ant - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message