commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task JellyTask.java
Date Thu, 12 Dec 2002 15:40:38 GMT
mvdb        2002/12/12 07:40:37

  Modified:    jelly/src/java/org/apache/commons/jelly/task JellyTask.java
  Log:
  Now using getLocation and getProject instead of directly referencing the protected instance.
This instance will be deprecated in the next ant release, that's why it caught my eye.
  
  Revision  Changes    Path
  1.11      +4 -4      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task/JellyTask.java
  
  Index: JellyTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task/JellyTask.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JellyTask.java	11 Dec 2002 12:41:00 -0000	1.10
  +++ JellyTask.java	12 Dec 2002 15:40:37 -0000	1.11
  @@ -70,12 +70,12 @@
               
               Script script = compileScript();
               JellyContext context = getJellyContext();
  -            context.setVariable( "project", project );
  +            context.setVariable( "project", getProject() );
               script.run( context, getXMLOutput() );
               getXMLOutput().flush();
           }
           catch (Exception e) {
  -            throw new BuildException(e, location);
  +            throw new BuildException(e, getLocation() );
           }
       }
       
  @@ -156,7 +156,7 @@
               int idx = text.lastIndexOf('/');
               text = text.substring(0, idx + 1);
               JellyContext parentContext =  new JellyContext(getRootContext(), new URL(text));
  -            context = new AntJellyContext(project, parentContext);
  +            context = new AntJellyContext(getProject() , parentContext);
               
               // register the Ant tag library
               context.registerTagLibrary( "jelly:ant", new AntTagLibrary() );
  @@ -186,7 +186,7 @@
        * @return the URL for the relative file name or absolute URL 
        */
       protected URL resolveURL(String name) throws MalformedURLException {
  -		File file = project.resolveFile(name);
  +		File file = getProject().resolveFile(name);
           if (file.exists()) {
               return file.toURL();
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message