ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: JXPathPropertyHelper -- error messages/bug?
Date Wed, 28 May 2003 05:09:46 GMT
You have forgotten to add the Bug-ID:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20272


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Adam Jack [mailto:ajack@TrySybase.com]
> Gesendet am: Dienstag, 27. Mai 2003 20:08
> An: 'Ant Users List'
> Betreff: RE: JXPathPropertyHelper -- error messages/bug?
> 
> Actually, maybe a fix is along the lines of
> 
> 	if ((null==iter)||(!iter.hasNext())
> 
> org.apache.tools.ant.taskdefs.optional.JXPath.java line 132:
> 
>             if(iter==null){
>                 return "null";
>             }
> 
> before the call to:
> 
>             result += iter.next();
> 
> regards
> 
> Adam
> -----Original Message-----
> From: Adam Jack [mailto:ajack@trysybase.com]
> Sent: Tuesday, May 27, 2003 12:05 PM
> To: user@ant.apache.org
> Subject: JXPathPropertyHelper -- error messages/bug?
> 
> 
> I am working with centipede which is a heavy user of this 
> property helper.
> It has entries like this:
> 
>   <property name="project.src.dir"
> 
> value="${jxpath:/references/module.xml/root/module/project[@na
> me=$project.na
> me]/code[@type='java/plain']/@dir}"/>
> 
> If no <code element exists I get an unhelpful exception 
> (below) -- without
> any context whatsoever. Is this a bug (i.e. the code ought check
> iter.hasNext before calling iter.next) -- and/or could the 
> code at least
> annotate the exception with (1) property name (2) property 
> 'expression'.
> 
> Thanks in advance.
> 
> regards
> 
> Adam
> 
> ------------------------------------------------------------
> 
> 
>    java.util.NoSuchElementException
>         at
> org.apache.commons.jxpath.ri.EvalContext.next(EvalContext.java:177)
>         at
> org.apache.commons.jxpath.ri.compiler.Expression$ValueIterator
> .next(Expressi
> on.java:175)
>         at
> org.apache.tools.ant.taskdefs.optional.JXPath$JXPathPropertyHe
> lper.getProper
> tyHook(JXPath
> .java:136)
>         at
> org.apache.tools.ant.PropertyHelper.getPropertyHook(PropertyHe
> lper.java:197)
>         at
> org.apache.tools.ant.PropertyHelper.getProperty(PropertyHelper
> .java:443)
>         at
> org.apache.tools.ant.PropertyHelper.replaceProperties(Property
> Helper.java:28
> 9)
>         at 
> org.apache.tools.ant.Project.replaceProperties(Project.java:486)
>         at
> org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(Runtim
> eConfigurable.
> java:310)
>         at
> org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(Runtim
> eConfigurable.
> java:266)
>         at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElem
> ent.java:143)
>         at org.apache.tools.ant.Task.perform(Task.java:347)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper
> 2.java:122)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHel
> per.java:120)
>         at org.apache.tools.ant.Main.runBuild(Main.java:597)
>         at org.apache.tools.ant.Main.start(Main.java:197)
>         at org.apache.tools.ant.Main.main(Main.java:235)
> F:\data\CommonsVersion\smoke-test>
> 
> --
> <http://www.try.sybase.com>
> Experience Sybase Technology ...
> 
> 
> ---------------------------------------------------------------------
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message