cvs commit: ant/src/main/org/apache/tools/ant AntTypeDefinition.java DirectoryScanner.java IntrospectionHelper.java ProjectHelper.java Target.java
peterreilly2004/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 ChangesPath 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.java9 Mar 2004 17:01:29 - 1.7.2.4 +++ AntTypeDefinition.java15 Mar 2004 17:33:24 - 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 - 1.64.2.6 +++ DirectoryScanner.java 15 Mar 2004 17:33:24 - 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 +1
cvs commit: ant/src/main/org/apache/tools/ant AntTypeDefinition.java DirectoryScanner.java IntrospectionHelper.java ProjectHelper.java Target.java
peterreilly2004/03/15 09:33:09 Modified:src/main/org/apache/tools/ant AntTypeDefinition.java DirectoryScanner.java IntrospectionHelper.java ProjectHelper.java Target.java Log: stylecheck Revision ChangesPath 1.12 +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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AntTypeDefinition.java9 Mar 2004 16:47:59 - 1.11 +++ AntTypeDefinition.java15 Mar 2004 17:33:09 - 1.12 @@ -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.71 +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.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- DirectoryScanner.java 9 Mar 2004 16:47:59 - 1.70 +++ DirectoryScanner.java 15 Mar 2004 17:33:09 - 1.71 @@ -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 { -