Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 36742 invoked from network); 6 Apr 2009 11:15:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2009 11:15:26 -0000 Received: (qmail 34663 invoked by uid 500); 6 Apr 2009 11:15:25 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 34570 invoked by uid 500); 6 Apr 2009 11:15:25 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 34560 invoked by uid 99); 6 Apr 2009 11:15:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 11:15:25 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 11:15:16 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lqmn0-0001Tk-1j for user@ant.apache.org; Mon, 06 Apr 2009 04:14:54 -0700 Message-ID: <22906706.post@talk.nabble.com> Date: Mon, 6 Apr 2009 04:14:54 -0700 (PDT) From: NonySingh To: user@ant.apache.org Subject: Re: Generics code Compile in Eclipse 3.4 , compilation fails in ANT1.7 (JRE 1.6.0_07) In-Reply-To: <22903702.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nonysingh79@yahoo.com References: <22903702.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Hey guys why are u polluting the actual query with your own query and answers. It would be great if you can post this other query and answers into another thread. Nony NonySingh wrote: > > 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();
> 			
> 			thisSetDS.add(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. > > >
TestANtError.java:14: 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. > > Regards > > Nony > -- View this message in context: http://www.nabble.com/Generics-code-Compile-in-Eclipse-3.4-%2C-compilation-fails-in-ANT1.7-%28JRE-1.6.0_07%29-tp22903702p22906706.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org