peterreilly 2004/03/15 09:33:24
Modified: src/main/org/apache/tools/ant Tag: ANT_16_BRANCH
AntTypeDefinition.java DirectoryScanner.java
IntrospectionHelper.java ProjectHelper.java
Target.java
Log:
stylecheck
Revision Changes Path
No revision
No revision
1.7.2.5 +4 -8 ant/src/main/org/apache/tools/ant/AntTypeDefinition.java
Index: AntTypeDefinition.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/AntTypeDefinition.java,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -r1.7.2.4 -r1.7.2.5
--- AntTypeDefinition.java 9 Mar 2004 17:01:29 -0000 1.7.2.4
+++ AntTypeDefinition.java 15 Mar 2004 17:33:24 -0000 1.7.2.5
@@ -352,17 +352,13 @@
// is the same
ClassLoader oldLoader = other.getClassLoader();
ClassLoader newLoader = this.getClassLoader();
- if (oldLoader != null
- && newLoader != null
+ return
+ newLoader != null
+ && oldLoader != null
&& oldLoader instanceof AntClassLoader
&& newLoader instanceof AntClassLoader
&& ((AntClassLoader) oldLoader).getClasspath()
- .equals(((AntClassLoader) newLoader).getClasspath())
- ) {
- return true;
- } else {
- return false;
- }
+ .equals(((AntClassLoader) newLoader).getClasspath());
}
private String extractClassname(Class c) {
1.64.2.7 +8 -8 ant/src/main/org/apache/tools/ant/DirectoryScanner.java
Index: DirectoryScanner.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
retrieving revision 1.64.2.6
retrieving revision 1.64.2.7
diff -u -r1.64.2.6 -r1.64.2.7
--- DirectoryScanner.java 9 Mar 2004 17:01:29 -0000 1.64.2.6
+++ DirectoryScanner.java 15 Mar 2004 17:33:24 -0000 1.64.2.7
@@ -241,7 +241,7 @@
private boolean followSymlinks = true;
/** Helper. */
- private static final FileUtils fileUtils = FileUtils.newFileUtils();
+ private static final FileUtils FILE_UTILS = FileUtils.newFileUtils();
/** Whether or not everything tested so far has been included. */
protected boolean everythingIncluded = true;
@@ -684,14 +684,14 @@
// we need to double check.
try {
File canonFile = myfile.getCanonicalFile();
- String path = fileUtils.removeLeadingPath(canonBase,
+ String path = FILE_UTILS.removeLeadingPath(canonBase,
canonFile);
if (!path.equals(currentelement) || ON_VMS) {
myfile = findFile(basedir, currentelement);
if (myfile != null) {
currentelement =
- fileUtils.removeLeadingPath(basedir,
- myfile);
+ FILE_UTILS.removeLeadingPath(basedir,
+ myfile);
}
}
} catch (IOException ex) {
@@ -704,7 +704,7 @@
if (f.exists()) {
// adapt currentelement to the case we've
// actually found
- currentelement = fileUtils.removeLeadingPath(basedir,
+ currentelement =
FILE_UTILS.removeLeadingPath(basedir,
f);
myfile = f;
}
@@ -833,7 +833,7 @@
Vector noLinks = new Vector();
for (int i = 0; i < newfiles.length; i++) {
try {
- if (fileUtils.isSymbolicLink(dir, newfiles[i])) {
+ if (FILE_UTILS.isSymbolicLink(dir, newfiles[i])) {
String name = vpath + newfiles[i];
File file = new File(dir, newfiles[i]);
if (file.isDirectory()) {
@@ -1201,7 +1201,7 @@
* @since Ant 1.5.2
*/
public Resource getResource(String name) {
- File f = fileUtils.resolveFile(basedir, name);
+ File f = FILE_UTILS.resolveFile(basedir, name);
return new Resource(name, f.exists(), f.lastModified(),
f.isDirectory());
}
@@ -1346,7 +1346,7 @@
if (pathElements.size() > 0) {
String current = (String) pathElements.remove(0);
try {
- if (fileUtils.isSymbolicLink(base, current)) {
+ if (FILE_UTILS.isSymbolicLink(base, current)) {
return true;
} else {
base = new File(base, current);
1.65.2.14 +3 -3
ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
Index: IntrospectionHelper.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
retrieving revision 1.65.2.13
retrieving revision 1.65.2.14
diff -u -r1.65.2.13 -r1.65.2.14
--- IntrospectionHelper.java 9 Mar 2004 17:01:29 -0000 1.65.2.13
+++ IntrospectionHelper.java 15 Mar 2004 17:33:24 -0000 1.65.2.14
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.Locale;
import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.taskdefs.PreSetDef;
/**
@@ -310,6 +309,7 @@
throws InvocationTargetException,
IllegalAccessException,
InstantiationException {
if (child != null) {
+ // Empty
} else if (c.getParameterTypes().length ==
0) {
child = c.newInstance(new Object[] {});
} else {
@@ -925,8 +925,8 @@
public void set(Project p, Object parent, String value)
throws InvocationTargetException,
IllegalAccessException {
m.invoke(parent,
- new Boolean[] {
- new Boolean(Project.toBoolean(value))});
+ new Boolean[] {Project.toBoolean(value)
+ ? Boolean.TRUE :
Boolean.FALSE});
}
};
1.101.2.10 +1 -1 ant/src/main/org/apache/tools/ant/ProjectHelper.java
Index: ProjectHelper.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
retrieving revision 1.101.2.9
retrieving revision 1.101.2.10
diff -u -r1.101.2.9 -r1.101.2.10
--- ProjectHelper.java 9 Mar 2004 17:01:29 -0000 1.101.2.9
+++ ProjectHelper.java 15 Mar 2004 17:33:24 -0000 1.101.2.10
@@ -508,7 +508,7 @@
if (index == -1) {
return componentName;
}
- return componentName.substring(index+1);
+ return componentName.substring(index + 1);
}
/**
1.46.2.5 +1 -0 ant/src/main/org/apache/tools/ant/Target.java
Index: Target.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Target.java,v
retrieving revision 1.46.2.4
retrieving revision 1.46.2.5
diff -u -r1.46.2.4 -r1.46.2.5
--- Target.java 9 Mar 2004 17:01:29 -0000 1.46.2.4
+++ Target.java 15 Mar 2004 17:33:24 -0000 1.46.2.5
@@ -194,6 +194,7 @@
/**
* Does this target depend on the named target?
+ * @param other the other named target.
* @return true if the target does depend on the named target
* @since Ant 1.6
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]