From ca2fd67c3a5e71cf2fb5c3750a0ef1cbfae0e88f Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Sun, 12 Nov 2006 22:29:31 +0000 Subject: [PATCH] checkstyle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@474071 13f79535-47bb-0310-9956-ffa450edef68 --- .../optional/ejb/BorlandDeploymentTool.java | 14 +++++--- .../optional/ejb/BorlandGenerateClient.java | 34 ++++++++++++++++--- .../ant/taskdefs/optional/ejb/DDCreator.java | 1 - .../optional/ejb/DDCreatorHelper.java | 2 ++ .../optional/ejb/DescriptorHandler.java | 2 ++ .../optional/ejb/EJBDeploymentTool.java | 5 ++- .../ant/taskdefs/optional/ejb/EjbJar.java | 5 +++ .../tools/ant/taskdefs/optional/ejb/Ejbc.java | 3 +- .../ant/taskdefs/optional/ejb/EjbcHelper.java | 6 +++- .../optional/ejb/GenericDeploymentTool.java | 6 +++- .../taskdefs/optional/ejb/IPlanetEjbc.java | 4 +++ .../optional/ejb/IPlanetEjbcTask.java | 2 ++ .../ejb/InnerClassFilenameFilter.java | 2 +- .../optional/ejb/WeblogicDeploymentTool.java | 21 ++++++++++-- .../ejb/WeblogicTOPLinkDeploymentTool.java | 2 +- .../optional/ejb/WebsphereDeploymentTool.java | 12 +++++-- 16 files changed, 102 insertions(+), 19 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java index cea76e48b..55063e5f4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java @@ -505,9 +505,9 @@ public class BorlandDeploymentTool extends GenericDeploymentTool public void setProcessInputStream(OutputStream param1) throws IOException { } /** - * - * @param is - * @exception java.io.IOException + * Set the output stream of the process. + * @param is the input stream. + * @throws IOException if there is an error. */ public void setProcessOutputStream(InputStream is) throws IOException { try { @@ -516,7 +516,8 @@ public class BorlandDeploymentTool extends GenericDeploymentTool while ((javafile = reader.readLine()) != null) { if (javafile.endsWith(".java")) { String classfile = toClassFile(javafile); - String key = classfile.substring(getConfig().srcDir.getAbsolutePath().length() + 1); + String key = classfile.substring( + getConfig().srcDir.getAbsolutePath().length() + 1); genfiles.put(key, new File(classfile)); } } @@ -527,6 +528,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool } } + /** + * Set the error stream of the process. + * @param is the input stream. + * @throws IOException if there is an error. + */ public void setProcessErrorStream(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); String s = reader.readLine(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java index b959af705..392f17a23 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java @@ -41,6 +41,7 @@ public class BorlandGenerateClient extends Task { static final String JAVA_MODE = "java"; static final String FORK_MODE = "fork"; + // CheckStyle:VisibilityModifier OFF - bc /** debug the generateclient task */ boolean debug = false; @@ -58,13 +59,19 @@ public class BorlandGenerateClient extends Task { /** hold the version */ int version = BorlandDeploymentTool.BAS; + // CheckStyle:VisibilityModifier ON + /** + * Set the version attribute. + * @param version the value to use. + */ public void setVersion(int version) { this.version = version; } /** * Command launching mode: java or fork. + * @param s the mode to use. */ public void setMode(String s) { mode = s; @@ -72,6 +79,7 @@ public class BorlandGenerateClient extends Task { /** * If true, turn on the debug mode for each of the Borland tools launched. + * @param debug a boolean value. */ public void setDebug(boolean debug) { this.debug = debug; @@ -79,6 +87,7 @@ public class BorlandGenerateClient extends Task { /** * EJB JAR file. + * @param ejbfile the file to use. */ public void setEjbjar(File ejbfile) { ejbjarfile = ejbfile; @@ -86,6 +95,7 @@ public class BorlandGenerateClient extends Task { /** * Client JAR file name. + * @param clientjar the file to use. */ public void setClientjar(File clientjar) { clientjarfile = clientjar; @@ -93,6 +103,7 @@ public class BorlandGenerateClient extends Task { /** * Path to use for classpath. + * @param classpath the path to use. */ public void setClasspath(Path classpath) { if (this.classpath == null) { @@ -104,6 +115,7 @@ public class BorlandGenerateClient extends Task { /** * Adds path to the classpath. + * @return a path to be configured as a nested element. */ public Path createClasspath() { if (this.classpath == null) { @@ -114,6 +126,7 @@ public class BorlandGenerateClient extends Task { /** * Reference to existing path, to use as a classpath. + * @param r the reference to use. */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); @@ -161,7 +174,10 @@ public class BorlandGenerateClient extends Task { } // end of else } - /** launch the generate client using java api */ + /** + * launch the generate client using java api. + * @throws BuildException if there is an error. + */ protected void executeJava() throws BuildException { try { if (version == BorlandDeploymentTool.BES) { @@ -206,7 +222,10 @@ public class BorlandGenerateClient extends Task { } } - /** launch the generate client using system api */ + /** + * launch the generate client using system api. + * @throws BuildException if there is an error. + */ protected void executeFork() throws BuildException { if (version == BorlandDeploymentTool.BAS) { executeForkV4(); @@ -216,7 +235,10 @@ public class BorlandGenerateClient extends Task { } } - /** launch the generate client using system api */ + /** + * launch the generate client using system api. + * @throws BuildException if there is an error. + */ protected void executeForkV4() throws BuildException { try { @@ -250,7 +272,11 @@ public class BorlandGenerateClient extends Task { } } - /** launch the generate client using system api */ + + /** + * launch the generate client using system api. + * @throws BuildException if there is an error. + */ protected void executeForkV5() throws BuildException { try { log("mode : fork " + BorlandDeploymentTool.BES, Project.MSG_DEBUG); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java index 8c45bf5cf..529a0a9c7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.ejb; import java.io.File; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.types.Commandline; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java index 5768c2974..b9235201f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreatorHelper.java @@ -40,10 +40,12 @@ public final class DDCreatorHelper { */ private File generatedFilesDirectory; + // CheckStyle:VisibilityModifier OFF - bc /** * The descriptor text files for which a serialised descriptor is to be created. */ String[] descriptors; + // CheckStyle:VisibilityModifier ON /** * The main method. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java index ab8f7e6f9..9e1ebac75 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java @@ -75,6 +75,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { */ private int parseState = STATE_LOOKING_EJBJAR; + // CheckStyle:VisibilityModifier OFF - bc /** * Instance variable used to store the name of the current element being * processed by the SAX parser. Accessed by the SAX parser call-back methods @@ -106,6 +107,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { private boolean inEJBRef = false; private Hashtable urlDTDs = new Hashtable(); + // CheckStyle:VisibilityModifier OFF - bc /** * The directory containing the bean classes and interfaces. This is diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java index 33a744d9c..c42b2a83e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EJBDeploymentTool.java @@ -32,23 +32,26 @@ public interface EJBDeploymentTool { * * @param descriptorFilename the name of the deployment descriptor * @param saxParser a SAX parser which can be used to parse the deployment descriptor. + * @throws BuildException if there is an error. */ void processDescriptor(String descriptorFilename, SAXParser saxParser) throws BuildException; /** * Called to validate that the tool parameters have been configured. - * + * @throws BuildException if there is an error. */ void validateConfigured() throws BuildException; /** * Set the task which owns this tool + * @param task the task. */ void setTask(Task task); /** * Configure this tool for use in the ejbjar task. + * @param config contains configuration state. */ void configure(EjbJar.Config config); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java index b90fff54c..f161ca078 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java @@ -68,6 +68,7 @@ public class EjbJar extends MatchingTask { * This state is passed to the deployment tools for configuration */ static class Config { + // CheckStyle:VisibilityModifier OFF - bc /** * Stores a handle to the directory under which to search for class * files @@ -122,6 +123,7 @@ public class EjbJar extends MatchingTask { * The dependency analyzer to use to add additional classes to the jar */ public String analyzer; + // CheckStyle:VisibilityModifier ON } /** @@ -169,8 +171,11 @@ public class EjbJar extends MatchingTask { * @since ant 1.6 */ public static class CMPVersion extends EnumeratedAttribute { + /** 1.0 value */ public static final String CMP1_0 = "1.0"; + /** 2.0 value */ public static final String CMP2_0 = "2.0"; + /** {@inheritDoc}. */ public String[] getValues() { return new String[]{ CMP1_0, diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java index ae6a22253..3d3f665f2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.ejb; import java.io.File; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.types.Commandline; @@ -152,6 +151,7 @@ public class Ejbc extends MatchingTask { * If true, ejbc will keep the * intermediate Java files used to build the class files. * This can be useful when debugging. + * @param newKeepgenerated a boolean as a string. */ public void setKeepgenerated(String newKeepgenerated) { keepgenerated = Boolean.valueOf(newKeepgenerated.trim()).booleanValue(); @@ -172,6 +172,7 @@ public class Ejbc extends MatchingTask { /** * Set the classpath to be used for this compilation. + * @param s the classpath (as a string) to use. */ public void setClasspath(String s) { this.classpath = FileUtils.translatePath(s); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java index 41eed66d0..ee473897c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbcHelper.java @@ -57,15 +57,19 @@ public class EjbcHelper { */ private File sourceDirectory; + // CheckStyle:VisibilityModifier OFF - bc /** * The names of the serialised deployment descriptors */ String[] descriptors; + // CheckStyle:VisibilityModifier ON private boolean keepGenerated; /** * Command line interface for the ejbc helper task. + * @param args command line arguments. + * @throws Exception if there is a problem. */ public static void main(String[] args) throws Exception { EjbcHelper helper = new EjbcHelper(args); @@ -143,7 +147,7 @@ public class EjbcHelper { primaryKeyClassPath = ((EntityDescriptor) dd).getPrimaryKeyClassName(); primaryKeyClassPath - = primaryKeyClassPath.replace('.', '/') + ".java";; + = primaryKeyClassPath.replace('.', '/') + ".java"; } File homeInterfaceSource = new File(sourceDirectory, homeInterfacePath); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java index d4f4a1768..bdca4f7aa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java @@ -125,6 +125,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { */ private DependencyAnalyzer dependencyAnalyzer; + /** No arg constructor */ public GenericDeploymentTool() { } @@ -314,6 +315,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { * @param logicalFilename A String representing the name, including * all relevant path information, that should be stored for the entry * being added. + * @throws BuildException if there is a problem. */ protected void addFileToJar(JarOutputStream jStream, File inputFile, @@ -359,6 +361,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { /** * Get a descriptionHandler. * @param srcDir the source directory. + * @return a handler. */ protected DescriptorHandler getDescriptorHandler(File srcDir) { DescriptorHandler h = new DescriptorHandler(getTask(), srcDir); @@ -378,6 +381,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { * * vendor-specific subclasses should override this method to define * the vendor-specific locations of the EJB DTDs + * @param handler no used in this class. */ protected void registerKnownDTDs(DescriptorHandler handler) { // none to register for generic @@ -896,7 +900,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { * Returns a Classloader object which parses the passed in generic EjbJar classpath. * The loader is used to dynamically load classes from javax.ejb.* and the classes * being added to the jar. - * + * @return a classloader. */ protected ClassLoader getClassLoaderForBuild() { if (classpathLoader != null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java index 722396f56..936e97508 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java @@ -625,14 +625,18 @@ public class IPlanetEjbc { * descriptor DTD. */ public EjbcHandler() { + /** EJB 1.1 ID */ final String PUBLICID_EJB11 = "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; + /** IPlanet ID */ final String PUBLICID_IPLANET_EJB_60 = "-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"; + /** EJB 1.1 location */ final String DEFAULT_IAS60_EJB11_DTD_LOCATION = "ejb-jar_1_1.dtd"; + /** IAS60 location */ final String DEFAULT_IAS60_DTD_LOCATION = "IASEjb_jar_1_0.dtd"; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java index 223d3453d..88cbd4352 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java @@ -142,6 +142,7 @@ public class IPlanetEjbcTask extends Task { /** * Adds to the classpath used when compiling the EJB stubs and skeletons. + * @return the class path. */ public Path createClasspath() { if (classpath == null) { @@ -183,6 +184,7 @@ public class IPlanetEjbcTask extends Task { /** * Does the work. + * @throws BuildException if there is a problem. */ public void execute() throws BuildException { checkConfiguration(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java index 8403c81b2..10ec3b190 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java @@ -31,7 +31,7 @@ public class InnerClassFilenameFilter implements FilenameFilter { baseClassName = baseclass.substring(0, extidx); } - public boolean accept (File Dir, String filename) { + public boolean accept(File Dir, String filename) { if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) || (filename.indexOf(baseClassName + "$") != 0)) { return false; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java index bed77537b..61738d164 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java @@ -233,12 +233,17 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { * Sets the weblogic.StdoutSeverityLevel to use when running the JVM that * executes ejbc; optional. Set to 16 to avoid the warnings about EJB Home and * Remotes being in the classpath + * @param jvmDebugLevel the value to use. */ public void setJvmDebugLevel(Integer jvmDebugLevel) { this.jvmDebugLevel = jvmDebugLevel; } + /** + * Get the debug level. + * @return the jvm debug level (may be null). + */ public Integer getJvmDebugLevel() { return jvmDebugLevel; } @@ -303,13 +308,17 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { * featured in weblogic 6 has, however, been deprecated in version 7. When * using with version 7 this attribute should be set to * "weblogic.ejbc" to avoid the deprecation warning. + * @param ejbcClass the name of the class to use. */ public void setEjbcClass(String ejbcClass) { this.ejbcClass = ejbcClass; } - /** Get the ejbc compiler class */ + /** + * Get the ejbc compiler class. + * @return the name of the ejbc compiler class. + */ public String getEjbcClass() { return ejbcClass; } @@ -354,6 +363,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { /** * Set the value of the oldCMP scheme. This is an antonym for newCMP * @ant.attribute ignore="true' + * @param oldCMP a boolean value. */ public void setOldCMP(boolean oldCMP) { this.newCMP = !oldCMP; @@ -370,6 +380,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { * prefix. Under this scheme the name of the CMP descriptor does not match * the name actually used in the main weblogic EJB descriptor. Also, * descriptors which contain multiple CMP references could not be used. + * @param newCMP a boolean value. */ public void setNewCMP(boolean newCMP) { this.newCMP = newCMP; @@ -379,6 +390,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { /** * Do not EJBC the jar after it has been put together; * optional, default false + * @param noEJBC a boolean value. */ public void setNoEJBC(boolean noEJBC) { this.noEJBC = noEJBC; @@ -646,6 +658,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { /** * Called to validate that the tool parameters have been configured. + * @throws BuildException if there is an error. */ public void validateConfigured() throws BuildException { super.validateConfigured(); @@ -836,6 +849,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { try { genericJar.close(); } catch (IOException closeException) { + // empty } } @@ -843,6 +857,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { try { wlJar.close(); } catch (IOException closeException) { + // empty } } @@ -850,6 +865,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { try { newJarStream.close(); } catch (IOException closeException) { + // empty } try { @@ -875,6 +891,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { * Jar File passed to it. * * @param classjar java.io.File representing jar file to get classes from. + * @return the classloader for the jarfile. + * @throws IOException if there is a problem. */ protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { Path lookupPath = new Path(getTask().getProject()); @@ -890,4 +908,3 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { return getTask().getProject().createClassLoader(lookupPath); } } - diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java index 28d64824f..6a572d37e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java @@ -90,7 +90,7 @@ public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { /** * Called to validate that the tool parameters have been configured. - * + * @throws BuildException if there is an error. */ public void validateConfigured() throws BuildException { super.validateConfigured(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java index bc99a587c..7f542863f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java @@ -309,7 +309,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { * Decide, wether ejbdeploy should be called or not; * optional, default true. * - * @param ejbdeploy + * @param ejbdeploy a boolean value. */ public void setEjbdeploy(boolean ejbdeploy) { this.ejbdeploy = ejbdeploy; @@ -361,7 +361,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { } - /* {@inheritDoc}. */ + /** {@inheritDoc}. */ protected DescriptorHandler getDescriptorHandler(File srcDir) { DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir); // register all the DTDs, both the ones that are known and @@ -381,6 +381,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { /** * Get a description handler. * @param srcDir the source directory. + * @return the handler. */ protected DescriptorHandler getWebsphereDescriptorHandler(final File srcDir) { DescriptorHandler handler = @@ -639,6 +640,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { /** * Called to validate that the tool parameters have been configured. + * @throws BuildException if there is an error. */ public void validateConfigured() throws BuildException { super.validateConfigured(); @@ -676,6 +678,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { * @param genericJarFile java.io.File The generic jar file. * @param websphereJarFile java.io.File The websphere jar file to check to * see if it needs to be rebuilt. + * @return true if a rebuild is required. */ protected boolean isRebuildRequired(File genericJarFile, File websphereJarFile) { boolean rebuild = false; @@ -835,6 +838,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { try { genericJar.close(); } catch (IOException closeException) { + // Ignore } } @@ -842,6 +846,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { try { wasJar.close(); } catch (IOException closeException) { + // Ignore } } @@ -849,6 +854,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { try { newJarStream.close(); } catch (IOException closeException) { + // Ignore } try { @@ -869,6 +875,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { * Jar File passed to it. * * @param classjar java.io.File representing jar file to get classes from. + * @return a classloader for the jar file. + * @throws IOException if there is an error. */ protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { Path lookupPath = new Path(getTask().getProject());