jvanzyl 02/02/21 06:00:17
Modified: src/java/org/apache/maven/importscrubber
ClassParserWrapper.java ConsoleProgressMonitor.java
FilePair.java FindCommand.java GoCommand.java
IProgressMonitor.java IReferenceFoundListener.java
ImportScrubber.java ImportScrubberGUI.java
ImportScrubberMenu.java ImportStatement.java
ImportStatementComparator.java
ImportStatements.java JavaFileFilter.java
PackageStmt.java PrintListener.java Resources.java
Resources_fr.java ScrubTask.java SourceFile.java
StatementFormatModel.java WorkingCellRenderer.java
src/java/org/apache/maven/importscrubber/ant
ImportScrubberTask.java
src/java/org/apache/maven/importscrubber/filechooser
AllInDirectoryFileChooser.java
DualRootSingleFileChooser.java IFileChooser.java
RecursiveFileChooser.java SingleFileChooser.java
src/java/org/apache/maven/importscrubber/format
AbstractStatementFormat.java
BreakForEachPackage.java BreakForTopPackage.java
IStatementFormat.java NoBreaks.java
StatementFormatFactory.java
Log:
- applying cleanup patches submitted by Stephane Bailliez
Revision Changes Path
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ClassParserWrapper.java
Index: ClassParserWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ClassParserWrapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ClassParserWrapper.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ClassParserWrapper.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ConsoleProgressMonitor.java
Index: ConsoleProgressMonitor.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ConsoleProgressMonitor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConsoleProgressMonitor.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ConsoleProgressMonitor.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/FilePair.java
Index: FilePair.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/FilePair.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FilePair.java 20 Feb 2002 19:02:59 -0000 1.1
+++ FilePair.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/FindCommand.java
Index: FindCommand.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/FindCommand.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FindCommand.java 20 Feb 2002 19:02:59 -0000 1.1
+++ FindCommand.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/GoCommand.java
Index: GoCommand.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/GoCommand.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GoCommand.java 20 Feb 2002 19:02:59 -0000 1.1
+++ GoCommand.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/IProgressMonitor.java
Index: IProgressMonitor.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/IProgressMonitor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IProgressMonitor.java 20 Feb 2002 19:02:59 -0000 1.1
+++ IProgressMonitor.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/IReferenceFoundListener.java
Index: IReferenceFoundListener.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/IReferenceFoundListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IReferenceFoundListener.java 20 Feb 2002 19:02:59 -0000 1.1
+++ IReferenceFoundListener.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubber.java
Index: ImportScrubber.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubber.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportScrubber.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportScrubber.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubberGUI.java
Index: ImportScrubberGUI.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubberGUI.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportScrubberGUI.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportScrubberGUI.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubberMenu.java
Index: ImportScrubberMenu.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportScrubberMenu.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportScrubberMenu.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportScrubberMenu.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatement.java
Index: ImportStatement.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportStatement.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportStatement.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatementComparator.java
Index: ImportStatementComparator.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatementComparator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportStatementComparator.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportStatementComparator.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +7 -3
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatements.java
Index: ImportStatements.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ImportStatements.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportStatements.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportStatements.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -119,7 +119,9 @@
if (classBody.indexOf(importStmt.getClassName()) == -1)
{
// nope, so remove it
- if (ImportScrubber.DEBUG) System.out.println("Removing unreferenced
import:" + importStmt.getClassName());
+ if (ImportScrubber.DEBUG) {
+ System.out.println("Removing unreferenced import:" +
importStmt.getClassName());
+ }
i.remove();
}
}
@@ -131,7 +133,9 @@
if (classBody.indexOf(importStmt.getFullyQualifiedClassName()) != -1)
{
// nope, so remove it
- if (ImportScrubber.DEBUG) System.out.println("Removing fully qualified
import:" + importStmt.getClassName());
+ if (ImportScrubber.DEBUG) {
+ System.out.println("Removing fully qualified import:" +
importStmt.getClassName());
+ }
i.remove();
}
}
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/JavaFileFilter.java
Index: JavaFileFilter.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/JavaFileFilter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JavaFileFilter.java 20 Feb 2002 19:02:59 -0000 1.1
+++ JavaFileFilter.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/PackageStmt.java
Index: PackageStmt.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/PackageStmt.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PackageStmt.java 20 Feb 2002 19:02:59 -0000 1.1
+++ PackageStmt.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/PrintListener.java
Index: PrintListener.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/PrintListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PrintListener.java 20 Feb 2002 19:02:59 -0000 1.1
+++ PrintListener.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/Resources.java
Index: Resources.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/Resources.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Resources.java 20 Feb 2002 19:02:59 -0000 1.1
+++ Resources.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +2 -2
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/Resources_fr.java
Index: Resources_fr.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/Resources_fr.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Resources_fr.java 20 Feb 2002 19:02:59 -0000 1.1
+++ Resources_fr.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@
{BREAK_TOP_PACKAGE, "Stopper pour les packages principaux"},
{BREAK_NONE, "Pas d'arr�ts"},
{ERR_NOT_DIR, "Le fichier n'est pas un r�pertoire!"},
- {ERR_DIR_NOT_EXIST, "Ce r�pertoire n'existe past!"},
+ {ERR_DIR_NOT_EXIST, "Ce r�pertoire n'existe pas!"},
{ERR_CLASS_FILE_MUST_EXIST, "Le fichier binaire (.class) doit exister:"},
{ERR_MUST_NOT_BE_DIR, "Le fichier d'entr�e ne peut pas �tre un r�pertoire: "},
{ERR_UNABLE_TO_FINISH, "Incapable de finir � cause de:"}
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ScrubTask.java
Index: ScrubTask.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ScrubTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ScrubTask.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ScrubTask.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +4 -2
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/SourceFile.java
Index: SourceFile.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/SourceFile.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceFile.java 20 Feb 2002 19:02:59 -0000 1.1
+++ SourceFile.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -141,7 +141,9 @@
buff.close();
reader.close();
- if (ImportScrubber.DEBUG) System.out.println("Done parsing source code file "
+ file.getAbsolutePath());
+ if (ImportScrubber.DEBUG) {
+ System.out.println("Done parsing source code file " +
file.getAbsolutePath());
+ }
_classBody = classBodyBuffer.toString();
_firstCommentHeader = firstCommentHeaderBuffer.toString();
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/StatementFormatModel.java
Index: StatementFormatModel.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/StatementFormatModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatementFormatModel.java 20 Feb 2002 19:02:59 -0000 1.1
+++ StatementFormatModel.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/WorkingCellRenderer.java
Index: WorkingCellRenderer.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/WorkingCellRenderer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WorkingCellRenderer.java 20 Feb 2002 19:02:59 -0000 1.1
+++ WorkingCellRenderer.java 21 Feb 2002 14:00:16 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ant/ImportScrubberTask.java
Index: ImportScrubberTask.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/ant/ImportScrubberTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImportScrubberTask.java 20 Feb 2002 19:02:59 -0000 1.1
+++ ImportScrubberTask.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +7 -3
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/AllInDirectoryFileChooser.java
Index: AllInDirectoryFileChooser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/AllInDirectoryFileChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AllInDirectoryFileChooser.java 20 Feb 2002 19:03:00 -0000 1.1
+++ AllInDirectoryFileChooser.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -74,8 +74,12 @@
{
File file = new File(root);
ResourceBundle res =
ResourceBundle.getBundle("org.apache.maven.importscrubber.Resources");
- if (!file.isDirectory()) throw new
IllegalArgumentException(res.getString(Resources.ERR_NOT_DIR));
- if (!file.exists()) throw new
IllegalArgumentException(Resources.ERR_DIR_NOT_EXIST);
+ if (!file.isDirectory()) {
+ throw new IllegalArgumentException(res.getString(Resources.ERR_NOT_DIR));
+ }
+ if (!file.exists()) {
+ throw new IllegalArgumentException(Resources.ERR_DIR_NOT_EXIST);
+ }
_root = root;
}
1.2 +11 -6
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/DualRootSingleFileChooser.java
Index: DualRootSingleFileChooser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/DualRootSingleFileChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DualRootSingleFileChooser.java 20 Feb 2002 19:03:00 -0000 1.1
+++ DualRootSingleFileChooser.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -83,20 +83,24 @@
ResourceBundle res =
ResourceBundle.getBundle("org.apache.maven.importscrubber.Resources");
// Sanity check inputs
File sourcesRootFile = new File(_sourcesRoot);
- if (!sourcesRootFile.isDirectory())
+ if (!sourcesRootFile.isDirectory()) {
throw new IllegalArgumentException(res.getString(Resources.ERR_NOT_DIR) +
":" +_sourcesRoot);
+ }
File classesRootFile = new File(_classesRoot);
- if (!classesRootFile.isDirectory())
+ if (!classesRootFile.isDirectory()) {
throw new IllegalArgumentException(res.getString(Resources.ERR_NOT_DIR) +
":" + _classesRoot);
+ }
File sourceFilenameFile = new File(_sourceFilename);
- if (sourceFilenameFile.isDirectory())
+ if (sourceFilenameFile.isDirectory()) {
throw new
IllegalArgumentException(res.getString(Resources.ERR_MUST_NOT_BE_DIR) +
_sourceFilename);
+ }
try
{
_sourceFilename = sourceFilenameFile.getCanonicalPath();
_sourcesRoot = sourcesRootFile.getCanonicalPath();
- if( !_sourceFilename.startsWith( _sourcesRoot ) )
+ if( !_sourceFilename.startsWith( _sourcesRoot ) ) {
throw new IllegalArgumentException("Input file '" + _sourceFilename + "'
must be in a subdirectory of sourcesRoot: " + _sourcesRoot );
+ }
}
catch( java.io.IOException e )
{
@@ -128,8 +132,9 @@
String cfilename = sourceFile.getName().substring(0,
sourceFile.getName().length()-5) + ".class";
String classfilename = _classesRoot + relativeSourceFilename +
ImportScrubber.FILE_SEPARATOR + cfilename;
File classfile = new File( classfilename );
- if( !classfile.exists() )
+ if( !classfile.exists() ) {
throw new IllegalArgumentException(Resources.ERR_CLASS_FILE_MUST_EXIST +
classfilename);
+ }
FilePair pair = new FilePair(sourceFile, classfile );
List files = new ArrayList();
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/IFileChooser.java
Index: IFileChooser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/IFileChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IFileChooser.java 20 Feb 2002 19:03:00 -0000 1.1
+++ IFileChooser.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +7 -3
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/RecursiveFileChooser.java
Index: RecursiveFileChooser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/RecursiveFileChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RecursiveFileChooser.java 20 Feb 2002 19:03:00 -0000 1.1
+++ RecursiveFileChooser.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -74,8 +74,12 @@
{
File file = new File(root);
ResourceBundle res =
ResourceBundle.getBundle("org.apache.maven.importscrubber.Resources");
- if (!file.isDirectory()) throw new
IllegalArgumentException(Resources.ERR_NOT_DIR);
- if (!file.exists()) throw new
IllegalArgumentException(Resources.ERR_DIR_NOT_EXIST);
+ if (!file.isDirectory()) {
+ throw new IllegalArgumentException(Resources.ERR_NOT_DIR);
+ }
+ if (!file.exists()) {
+ throw new IllegalArgumentException(Resources.ERR_DIR_NOT_EXIST);
+ }
_root = root;
}
1.2 +10 -4
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/SingleFileChooser.java
Index: SingleFileChooser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/filechooser/SingleFileChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SingleFileChooser.java 20 Feb 2002 19:03:00 -0000 1.1
+++ SingleFileChooser.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,9 @@
{
ResourceBundle res =
ResourceBundle.getBundle("org.apache.maven.importscrubber.Resources");
File file = new File(root);
- if (file.isDirectory()) throw new
IllegalArgumentException(res.getString(Resources.ERR_MUST_NOT_BE_DIR));
+ if (file.isDirectory()) {
+ throw new
IllegalArgumentException(res.getString(Resources.ERR_MUST_NOT_BE_DIR));
+ }
File test = null;
if (file.getName().endsWith(".java"))
@@ -83,7 +85,9 @@
test = new File(root + ".java");
}
- if (!test.exists()) throw new IllegalArgumentException("Source file " +
test.getAbsoluteFile() + " doesn't exist!");
+ if (!test.exists()) {
+ throw new IllegalArgumentException("Source file " + test.getAbsoluteFile()
+ " doesn't exist!");
+ }
if (file.getName().endsWith(".java"))
{
@@ -92,7 +96,9 @@
{
test = new File(root + ".class");
}
- if (!test.exists()) throw new IllegalArgumentException("Class file " +
test.getAbsoluteFile() + " doesn't exist!");
+ if (!test.exists()) {
+ throw new IllegalArgumentException("Class file " + test.getAbsoluteFile()
+ " doesn't exist!");
+ }
if (file.getName().endsWith(".java"))
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/AbstractStatementFormat.java
Index: AbstractStatementFormat.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/AbstractStatementFormat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractStatementFormat.java 20 Feb 2002 20:09:22 -0000 1.1
+++ AbstractStatementFormat.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/BreakForEachPackage.java
Index: BreakForEachPackage.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/BreakForEachPackage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BreakForEachPackage.java 20 Feb 2002 20:09:22 -0000 1.1
+++ BreakForEachPackage.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/BreakForTopPackage.java
Index: BreakForTopPackage.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/BreakForTopPackage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BreakForTopPackage.java 20 Feb 2002 20:09:22 -0000 1.1
+++ BreakForTopPackage.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/IStatementFormat.java
Index: IStatementFormat.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/IStatementFormat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IStatementFormat.java 20 Feb 2002 20:09:22 -0000 1.1
+++ IStatementFormat.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/NoBreaks.java
Index: NoBreaks.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/NoBreaks.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NoBreaks.java 20 Feb 2002 20:09:22 -0000 1.1
+++ NoBreaks.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/StatementFormatFactory.java
Index: StatementFormatFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/importscrubber/format/StatementFormatFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatementFormatFactory.java 20 Feb 2002 20:09:22 -0000 1.1
+++ StatementFormatFactory.java 21 Feb 2002 14:00:17 -0000 1.2
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>