You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2004/02/29 17:34:44 UTC
cvs commit: jakarta-cactus/integration/maven/samples/ejb/src/test-cactus/org/apache/cactus/sample/ejb TestConverterEJB.java
vmassol 2004/02/29 08:34:44
Modified: integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/util
FilterServletOutputStream.java
GenericResponseWrapper.java
integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb
ConverterHome.java Converter.java ConverterEJB.java
integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample
TestSampleFilter.java TestHttpUnitIntegration.java
TestSampleServlet.java TestSampleBodyTag.java
integration/maven/src/main/org/apache/cactus/integration/maven
CactusScannerTag.java CactusScanner.java
CactusTagLibrary.java
integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample
SampleBodyTag.java SampleFilter.java
SampleServlet.java
integration/maven/samples/ejb/src/test-cactus/org/apache/cactus/sample/ejb
TestConverterEJB.java
Log:
removing @author tags + some checkstyle corrections for the Maven plugin source files
Revision Changes Path
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/util/FilterServletOutputStream.java
Index: FilterServletOutputStream.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/util/FilterServletOutputStream.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FilterServletOutputStream.java 14 Feb 2004 14:51:24 -0000 1.2
+++ FilterServletOutputStream.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -34,8 +34,6 @@
* {@link <a href="http://www.orionserver.com/tutorials/filters/lesson3/">
* here</a>}
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*
* @see GenericResponseWrapper
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/util/GenericResponseWrapper.java
Index: GenericResponseWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/util/GenericResponseWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- GenericResponseWrapper.java 14 Feb 2004 14:51:24 -0000 1.2
+++ GenericResponseWrapper.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -38,8 +38,6 @@
* {@link <a href="http://www.orionserver.com/tutorials/filters/lesson3/">
* here</a>}
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*
* @see FilterServletOutputStream
1.3 +1 -3 jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/ConverterHome.java
Index: ConverterHome.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/ConverterHome.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConverterHome.java 14 Feb 2004 14:51:24 -0000 1.2
+++ ConverterHome.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -27,8 +27,6 @@
/**
* Sample EJB home interface
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public interface ConverterHome extends EJBHome
1.3 +1 -3 jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/Converter.java
Index: Converter.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/Converter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Converter.java 14 Feb 2004 14:51:24 -0000 1.2
+++ Converter.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -26,8 +26,6 @@
/**
* Sample EJB interface
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public interface Converter extends EJBObject
1.3 +1 -3 jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/ConverterEJB.java
Index: ConverterEJB.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/ejb/src/java/org/apache/cactus/sample/ejb/ConverterEJB.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConverterEJB.java 14 Feb 2004 14:51:24 -0000 1.2
+++ ConverterEJB.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -26,8 +26,6 @@
/**
* Sample EJB bean.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class ConverterEJB implements SessionBean
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleFilter.java
Index: TestSampleFilter.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleFilter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestSampleFilter.java 14 Feb 2004 14:51:24 -0000 1.2
+++ TestSampleFilter.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -38,8 +38,6 @@
/**
* Tests of the <code>SampleFilter</code> filter class.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class TestSampleFilter extends FilterTestCase
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestHttpUnitIntegration.java
Index: TestHttpUnitIntegration.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestHttpUnitIntegration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestHttpUnitIntegration.java 14 Feb 2004 14:51:24 -0000 1.2
+++ TestHttpUnitIntegration.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -27,8 +27,6 @@
/**
* Test the HtppUnit integration.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class TestHttpUnitIntegration extends ServletTestCase
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleServlet.java
Index: TestSampleServlet.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestSampleServlet.java 14 Feb 2004 14:51:24 -0000 1.2
+++ TestSampleServlet.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -25,8 +25,6 @@
/**
* Tests of the <code>SampleServlet</code> Servlet class.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class TestSampleServlet extends ServletTestCase
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java
Index: TestSampleBodyTag.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/test-cactus/org/apache/maven/cactus/sample/TestSampleBodyTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestSampleBodyTag.java 14 Feb 2004 14:51:24 -0000 1.2
+++ TestSampleBodyTag.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -28,8 +28,6 @@
/**
* Tests of the <code>SampleBodyTag</code> class.
*
- * @author <a href="mailto:nick@eblox.com">Nciholas Lesiecki</a>
- *
* @version $Id$
*/
public class TestSampleBodyTag extends JspTestCase
1.3 +50 -20 jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusScannerTag.java
Index: CactusScannerTag.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusScannerTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CactusScannerTag.java 14 Feb 2004 11:50:52 -0000 1.2
+++ CactusScannerTag.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -44,11 +44,13 @@
* task for example, in order to find out the list of tests to
* execute.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
* @version $Id$
*/
public class CactusScannerTag extends TagSupport implements TaskSource
{
+ /**
+ * Log instance.
+ */
private Log log = LogFactory.getLog(CactusScannerTag.class);
/**
@@ -87,6 +89,9 @@
*/
private String var;
+ /**
+ * Initializations.
+ */
public CactusScannerTag()
{
this.cactusScanner = new CactusScanner();
@@ -95,13 +100,13 @@
/**
* @see TagSupport#doTag(XMLOutput)
*/
- public void doTag(XMLOutput xmlOutput) throws JellyTagException
+ public void doTag(XMLOutput theXmlOutput) throws JellyTagException
{
this.cactusScanner.setProject(AntTagLibrary.getProject(context));
this.cactusScanner.clear();
// run the body first to configure the task via nested tags
- invokeBody(xmlOutput);
+ invokeBody(theXmlOutput);
// Process the fileset to extract Cactus test cases. We need to pass
// the project dependency classpath as the CactusScanner will need
@@ -139,12 +144,12 @@
/**
* @see TaskSource#setTaskProperty(String, Object)
*/
- public void setTaskProperty(String name, Object value)
+ public void setTaskProperty(String theName, Object theValue)
throws JellyTagException
{
try
{
- BeanUtils.setProperty(this, name, value);
+ BeanUtils.setProperty(this, theName, theValue);
}
catch (IllegalAccessException anException)
{
@@ -160,13 +165,18 @@
/**
* Adds a set of files (nested fileset attribute). This method is called
* dynamically by {@link #setTaskProperty}.
+ *
+ * @param theSet the Ant fileset to add
*/
- public void addFileset(FileSet set)
+ public void addFileset(FileSet theSet)
{
- log.debug("Adding fileset [" + set + "]");
- this.fileset = set;
+ log.debug("Adding fileset [" + theSet + "]");
+ this.fileset = theSet;
}
+ /**
+ * @return a newly created and empty {@link Path} object
+ */
public Path createClasspath()
{
log.debug("Creating classpath");
@@ -177,27 +187,40 @@
return this.classpath.createPath();
}
+ /**
+ * @return the classpath in which we will look for Cactus test cases.
+ */
public Path getClasspath()
{
return this.classpath;
}
- public void setClasspath(Path classpath)
+ /**
+ * Sets the classapth in which we will look for Cactus test cases.
+ * @param theClasspath the classapth to set
+ */
+ public void setClasspath(Path theClasspath)
{
- log.debug("Setting classpath [" + classpath + "]");
+ log.debug("Setting classpath [" + theClasspath + "]");
if (this.classpath == null)
{
- this.classpath = classpath;
+ this.classpath = theClasspath;
}
else
{
- this.classpath.append(classpath);
+ this.classpath.append(theClasspath);
}
}
- public void setClasspathRef(Reference r)
+ /**
+ * Sets the classpath in which we will look for Cactus test cases, using
+ * a reference.
+ *
+ * @param theReference the classpath reference
+ */
+ public void setClasspathRef(Reference theReference)
{
- createClasspath().setRefid(r);
+ createClasspath().setRefid(theReference);
}
/**
@@ -209,15 +232,22 @@
}
/**
- * Sets the name of the variable exported by this tag
+ * Sets the name of the variable exported by this tag.
+ * @param theVar the variable that will be exported by this tag and which
+ * will contain the list of Cactus test cases
*/
- public void setVar(String var)
+ public void setVar(String theVar)
{
- this.var = var;
+ this.var = theVar;
}
- public void setClasspathref(String classpathref)
+ /**
+ * Sets the classpath in which we will look for Cactus test cases, using
+ * a String reference.
+ * @param theClasspathref the classpath reference
+ */
+ public void setClasspathref(String theClasspathref)
{
- this.classpathref = classpathref;
+ this.classpathref = theClasspathref;
}
}
1.3 +35 -27 jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusScanner.java
Index: CactusScanner.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusScanner.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CactusScanner.java 14 Feb 2004 11:50:52 -0000 1.2
+++ CactusScanner.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -52,11 +52,13 @@
* takes no parameters</li>
* </ul>
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
* @version $Id$
*/
public class CactusScanner
{
+ /**
+ * Log instance.
+ */
private Log log = LogFactory.getLog(CactusScanner.class);
/**
@@ -69,11 +71,17 @@
*/
private List cactusTests = new ArrayList();
- public void setProject(Project project)
+ /**
+ * @param theProject the Ant project that is currently executing
+ */
+ public void setProject(Project theProject)
{
- this.project = project;
+ this.project = theProject;
}
+ /**
+ * Remove all Cactus class names that were found in the {@link Fileset}
+ */
public void clear()
{
this.cactusTests.clear();
@@ -90,12 +98,12 @@
/**
* Finds the Cactus test cases from a list of files.
*
- * @param fs the list of files in which to look for Cactus tests
- * @param classpath the classpaths needed to load the test classes
+ * @param theFileset the list of files in which to look for Cactus tests
+ * @param theClasspath the classpaths needed to load the test classes
*/
- public void processFileSet(FileSet fs, Path classpath)
+ public void processFileSet(FileSet theFileset, Path theClasspath)
{
- DirectoryScanner ds = fs.getDirectoryScanner(this.project);
+ DirectoryScanner ds = theFileset.getDirectoryScanner(this.project);
ds.scan();
String[] files = ds.getIncludedFiles();
@@ -116,7 +124,7 @@
log.debug("Found candidate class: [" + fqn + "]");
// Is it a Cactus test case?
- if (isJUnitTestCase(fqn, classpath))
+ if (isJUnitTestCase(fqn, theClasspath))
{
log.debug("Found Cactus test case: [" + fqn + "]");
this.cactusTests.add(fqn);
@@ -126,13 +134,13 @@
}
/**
- * @param className the fully qualified name of the class to check
- * @param classpath the classpaths needed to load the test classes
+ * @param theClassName the fully qualified name of the class to check
+ * @param theClasspath the classpaths needed to load the test classes
* @return true if the class is a JUnit test case
*/
- private boolean isJUnitTestCase(String className, Path classpath)
+ private boolean isJUnitTestCase(String theClassName, Path theClasspath)
{
- Class clazz = loadClass(className, classpath);
+ Class clazz = loadClass(theClassName, theClasspath);
if (clazz == null)
{
return false;
@@ -152,7 +160,7 @@
if (!testCaseClass.isAssignableFrom(clazz))
{
- log.debug("Not a JUnit test as class [" + className + "] does "
+ log.debug("Not a JUnit test as class [" + theClassName + "] does "
+ "not inherit from [" + TestCase.class.getName()
+ "]");
return false;
@@ -161,7 +169,7 @@
// the class must not be abstract
if (Modifier.isAbstract(clazz.getModifiers()))
{
- log.debug("Not a JUnit test as class [" + className + "] is "
+ log.debug("Not a JUnit test as class [" + theClassName + "] is "
+ "abstract");
return false;
}
@@ -183,7 +191,7 @@
if (!hasTestMethod)
{
- log.debug("Not a JUnit test as class [" + className + "] has "
+ log.debug("Not a JUnit test as class [" + theClassName + "] has "
+ "no method that start with \"test\", returns void and has "
+ "no parameters");
return false;
@@ -193,41 +201,41 @@
}
/**
- * @param className the fully qualified name of the class to check
- * @param classpath the classpaths needed to load the test classes
+ * @param theClassName the fully qualified name of the class to check
+ * @param theClasspath the classpaths needed to load the test classes
* @return the class object loaded by reflection from its string name
*/
- private Class loadClass(String className, Path classpath)
+ private Class loadClass(String theClassName, Path theClasspath)
{
Class clazz = null;
try
{
- clazz = createClassLoader(classpath).loadClass(className);
+ clazz = createClassLoader(theClasspath).loadClass(theClassName);
}
catch (ClassNotFoundException e)
{
- log.error("Failed to load class [" + className + "]", e);
+ log.error("Failed to load class [" + theClassName + "]", e);
}
return clazz;
}
/**
- * @param classpath the classpaths needed to load the test classes
+ * @param theClasspath the classpaths needed to load the test classes
* @return a ClassLoader that has all the needed classpaths for loading
* the Cactus tests classes
*/
- private ClassLoader createClassLoader(Path classpath)
+ private ClassLoader createClassLoader(Path theClasspath)
{
- URL[] urls = new URL[classpath.size()];
+ URL[] urls = new URL[theClasspath.size()];
try
{
- for (int i = 0; i < classpath.size(); i++)
+ for (int i = 0; i < theClasspath.size(); i++)
{
log.debug("Adding ["
- + new File(classpath.list()[i]).toURL() + "] "
+ + new File(theClasspath.list()[i]).toURL() + "] "
+ "to class loader classpath");
- urls[i] = new File(classpath.list()[i]).toURL();
+ urls[i] = new File(theClasspath.list()[i]).toURL();
}
}
catch (MalformedURLException e)
1.3 +1 -2 jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusTagLibrary.java
Index: CactusTagLibrary.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/src/main/org/apache/cactus/integration/maven/CactusTagLibrary.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CactusTagLibrary.java 14 Feb 2004 11:50:52 -0000 1.2
+++ CactusTagLibrary.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -24,7 +24,6 @@
/**
* Maven tag library for use in Jelly scripts.
*
- * @author <a href="vmassol@apache.org">Vincent Massol</a>
* @version $Id$
*/
public class CactusTagLibrary extends TagLibrary
1.3 +1 -4 jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleBodyTag.java
Index: SampleBodyTag.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleBodyTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SampleBodyTag.java 14 Feb 2004 14:51:24 -0000 1.2
+++ SampleBodyTag.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -30,9 +30,6 @@
* body. "Target" and "Replacement" Strings are defined by the tag's attributes
* and each "occurrence" of the target is replaced by the "replacement".
*
- * @author <a href="mailto:nick@eblox.com">Nicholas Lesiecki</a>
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class SampleBodyTag extends BodyTagSupport
1.3 +1 -3 jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleFilter.java
Index: SampleFilter.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleFilter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SampleFilter.java 14 Feb 2004 14:51:24 -0000 1.2
+++ SampleFilter.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -37,8 +37,6 @@
* to provide some functional tests for Cactus and examples for Cactus users.
* This filter simply adds a header and a footer to the returned HTML.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class SampleFilter implements Filter
1.3 +1 -4 jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleServlet.java
Index: SampleServlet.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/servlet/src/java/org/apache/maven/cactus/sample/SampleServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SampleServlet.java 14 Feb 2004 14:51:24 -0000 1.2
+++ SampleServlet.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -28,9 +28,6 @@
* to provide some functional tests for Cactus and examples for Cactus users.
* This servlet simply checks is a user is authenticated
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
- *
* @version $Id$
*/
public class SampleServlet extends HttpServlet
1.3 +1 -3 jakarta-cactus/integration/maven/samples/ejb/src/test-cactus/org/apache/cactus/sample/ejb/TestConverterEJB.java
Index: TestConverterEJB.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/samples/ejb/src/test-cactus/org/apache/cactus/sample/ejb/TestConverterEJB.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestConverterEJB.java 14 Feb 2004 14:51:24 -0000 1.2
+++ TestConverterEJB.java 29 Feb 2004 16:34:44 -0000 1.3
@@ -28,8 +28,6 @@
/**
* Sample Cactus test for a session bean.
*
- * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
- *
* @version $Id$
*/
public class TestConverterEJB extends ServletTestCase
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org