ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/AntTasks/source/net/douglasthrift/anttasks/Preverify.java
(Generate patch)

Comparing AntTasks/source/net/douglasthrift/anttasks/Preverify.java (file contents):
Revision 972 by douglas, 2007-12-19T03:19:39-08:00 vs.
Revision 1107 by douglas, 2008-11-04T12:53:49-08:00

# Line 4 | Line 4
4   //
5   // $Id$
6  
7 + /*  Copyright 2007 Douglas Thrift
8 + *
9 + *  Licensed under the Apache License, Version 2.0 (the "License");
10 + *  you may not use this file except in compliance with the License.
11 + *  You may obtain a copy of the License at
12 + *
13 + *      http://www.apache.org/licenses/LICENSE-2.0
14 + *
15 + *  Unless required by applicable law or agreed to in writing, software
16 + *  distributed under the License is distributed on an "AS IS" BASIS,
17 + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 + *  See the License for the specific language governing permissions and
19 + *  limitations under the License.
20 + */
21 +
22   package net.douglasthrift.anttasks;
23  
24   import java.io.File;
# Line 34 | Line 49 | public class Preverify extends Task
49          private boolean nofinalize;
50          private boolean nonative;
51          private boolean nofp;
52 <        private ArrayList<String> classnames;
52 >        private ArrayList<String> classnames = new ArrayList<String>();
53          private Path dirnames;
54  
55          public void setClasspath(Path classpath)
# Line 87 | Line 102 | public class Preverify extends Task
102  
103          public void setClassnames(String classnames)
104          {
90                if (this.classnames == null)
91                        this.classnames = new ArrayList<String>();
92
105                  for (String classname: classnames.split("[ ,]"))
106                          this.classnames.add(classname);
107          }
# Line 119 | Line 131 | public class Preverify extends Task
131  
132          public void execute()
133          {
134 <                if (classnames == null && dirnames == null)
134 >                if (classnames.isEmpty() && dirnames == null)
135                          throw new BuildException("no classnames or dirnames");
136  
137                  if (this.isUpToDate())
# Line 161 | Line 173 | public class Preverify extends Task
173  
174                  ArrayList<String> files = new ArrayList<String>();
175  
176 <                if (this.classnames != null)
177 <                        for (String classname: this.classnames)
178 <                        {
179 <                                this.log("Preverifying " + classname);
180 <                                exec.createArg().setValue(classname);
169 <                        }
176 >                for (String classname: this.classnames)
177 >                {
178 >                        this.log("Preverifying " + classname);
179 >                        exec.createArg().setValue(classname);
180 >                }
181  
182                  if (this.dirnames != null)
183                          for (String dirname: this.dirnames.list())
# Line 183 | Line 194 | public class Preverify extends Task
194          {
195                  FileUtils utils = FileUtils.getFileUtils();
196  
197 <                if (this.classnames != null)
197 >                if (!this.classnames.isEmpty())
198                          return false;
199  
200                  if (this.dirnames != null)

Comparing AntTasks/source/net/douglasthrift/anttasks/Preverify.java (property svn:eol-style):
Revision 972 by douglas, 2007-12-19T03:19:39-08:00 vs.
Revision 1107 by douglas, 2008-11-04T12:53:49-08:00

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines