ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend JDependTask.java
Date Mon, 03 Nov 2003 15:23:57 GMT
bodewig     2003/11/03 07:23:57

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/jdepend Tag:
                        ANT_16_BRANCH JDependTask.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.22.2.1  +29 -18    ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
  
  Index: JDependTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java,v
  retrieving revision 1.22
  retrieving revision 1.22.2.1
  diff -u -r1.22 -r1.22.2.1
  --- JDependTask.java	19 Jul 2003 11:20:18 -0000	1.22
  +++ JDependTask.java	3 Nov 2003 15:23:57 -0000	1.22.2.1
  @@ -515,29 +515,40 @@
               // we have to find a cleaner way to put this output
           }
   
  -        // This is deprecated - use classespath in the future
  -        String[] sourcesPath = getSourcespath().list();
  -        for (int i = 0; i < sourcesPath.length; i++) {
  -            File f = new File(sourcesPath[i]);
  +        if (getSourcespath() != null) {
  +            // This is deprecated - use classespath in the future
  +            String[] sourcesPath = getSourcespath().list();
  +            for (int i = 0; i < sourcesPath.length; i++) {
  +                File f = new File(sourcesPath[i]);
   
  -            // not necessary as JDepend would fail, but why loose some time?
  -            if (!f.exists() || !f.isDirectory()) {
  -                throw new BuildException("\"" + f.getPath() + "\" does not "
  -                                         + "represent a valid directory. JDepend would
fail.");
  +                // not necessary as JDepend would fail, but why loose
  +                // some time?
  +                if (!f.exists() || !f.isDirectory()) {
  +                    throw new BuildException("\"" + f.getPath() 
  +                                             + "\" does not represent a valid"
  +                                             + " directory. JDepend would"
  +                                             + " fail.");
  +                }
  +                commandline.createArgument().setValue(f.getPath());
               }
  -            commandline.createArgument().setValue(f.getPath());
           }
   
  -        // This is the new way - use classespath - code is the same for now
  -        String[] classesPath = getClassespath().list();
  -        for (int i = 0; i < classesPath.length; i++) {
  -            File f = new File(classesPath[i]);
  -            // not necessary as JDepend would fail, but why loose some time?
  -            if (!f.exists() || !f.isDirectory()) {
  -                throw new BuildException("\"" + f.getPath() + "\" does not "
  -                                         + "represent a valid directory. JDepend would
fail.");
  +        if (getClassespath() != null) {
  +            // This is the new way - use classespath - code is the
  +            // same for now
  +            String[] classesPath = getClassespath().list();
  +            for (int i = 0; i < classesPath.length; i++) {
  +                File f = new File(classesPath[i]);
  +                // not necessary as JDepend would fail, but why loose
  +                // some time?
  +                if (!f.exists() || !f.isDirectory()) {
  +                    throw new BuildException("\"" + f.getPath() 
  +                                             + "\" does not represent a valid"
  +                                             + " directory. JDepend would"
  +                                             + " fail.");
  +                }
  +                commandline.createArgument().setValue(f.getPath());
               }
  -            commandline.createArgument().setValue(f.getPath());
           }
   
           Execute execute = new Execute(new LogStreamHandler(this,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message