From 34f8f175d68cec9477247022470991a874ae3b0a Mon Sep 17 00:00:00 2001
From: Peter Donald
Date: Sun, 6 Jan 2002 02:22:41 +0000
Subject: [PATCH] cleaned
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270585 13f79535-47bb-0310-9956-ffa450edef68
---
.../ant/taskdefs/optional/ccm/CCMCheck.java | 9 +-
.../taskdefs/optional/ccm/CCMReconfigure.java | 98 +++++--------------
.../optional/ejb/BorlandDeploymentTool.java | 4 +-
.../ant/taskdefs/optional/ccm/CCMCheck.java | 9 +-
.../taskdefs/optional/ccm/CCMReconfigure.java | 98 +++++--------------
.../optional/ejb/BorlandDeploymentTool.java | 4 +-
6 files changed, 64 insertions(+), 158 deletions(-)
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
index 6db4ad7e5..5b96ba4ca 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
@@ -9,7 +9,6 @@ package org.apache.tools.ant.taskdefs.optional.ccm;
import java.io.File;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -111,8 +110,6 @@ public class CCMCheck extends Continuus
throws TaskException
{
Commandline commandLine = new Commandline();
- Project aProj = getProject();
- int result = 0;
// build the command line from what we got the format is
// ccm co /t .. files
@@ -122,11 +119,11 @@ public class CCMCheck extends Continuus
checkOptions( commandLine );
- result = run( commandLine );
+ final int result = run( commandLine, null );
if( result != 0 )
{
- String msg = "Failed executing: " + commandLine.toString();
- throw new TaskException( msg );
+ final String message = "Failed executing: " + commandLine.toString();
+ throw new TaskException( message );
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
index dc8843c3d..e1d4da59d 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.ccm;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -16,9 +15,9 @@ import org.apache.tools.ant.types.Commandline;
*
* @author Benoit Moussaud benoit.moussaud@criltelecom.com
*/
-public class CCMReconfigure extends Continuus
+public class CCMReconfigure
+ extends Continuus
{
-
/**
* /recurse --
*/
@@ -34,9 +33,9 @@ public class CCMReconfigure extends Continuus
*/
public final static String FLAG_PROJECT = "/project";
- private String project = null;
- private boolean recurse = false;
- private boolean verbose = false;
+ private String m_ccmProject;
+ private boolean m_recurse;
+ private boolean m_verbose;
public CCMReconfigure()
{
@@ -46,62 +45,26 @@ public class CCMReconfigure extends Continuus
/**
* Set the value of project.
- *
- * @param v Value to assign to project.
*/
- public void setCcmProject( String v )
+ public void setCcmProject( final String ccmProject )
{
- this.project = v;
+ m_ccmProject = ccmProject;
}
/**
* Set the value of recurse.
- *
- * @param v Value to assign to recurse.
*/
- public void setRecurse( boolean v )
+ public void setRecurse( final boolean recurse )
{
- this.recurse = v;
+ m_recurse = recurse;
}
/**
* Set the value of verbose.
- *
- * @param v Value to assign to verbose.
*/
- public void setVerbose( boolean v )
+ public void setVerbose( final boolean verbose )
{
- this.verbose = v;
- }
-
- /**
- * Get the value of project.
- *
- * @return value of project.
- */
- public String getCcmProject()
- {
- return project;
- }
-
- /**
- * Get the value of recurse.
- *
- * @return value of recurse.
- */
- public boolean isRecurse()
- {
- return recurse;
- }
-
- /**
- * Get the value of verbose.
- *
- * @return value of verbose.
- */
- public boolean isVerbose()
- {
- return verbose;
+ m_verbose = verbose;
}
/**
@@ -109,56 +72,47 @@ public class CCMReconfigure extends Continuus
*
* Builds a command line to execute ccm and then calls Exec's run method to
* execute the command line.
- *
- * @exception TaskException Description of Exception
*/
public void execute()
throws TaskException
{
- Commandline commandLine = new Commandline();
- Project aProj = getProject();
- int result = 0;
+ final Commandline cmd = new Commandline();
// build the command line from what we got the format
// as specified in the CCM.EXE help
- commandLine.setExecutable( getCcmCommand() );
- commandLine.createArgument().setValue( getCcmAction() );
+ cmd.setExecutable( getCcmCommand() );
+ cmd.createArgument().setValue( getCcmAction() );
- checkOptions( commandLine );
+ checkOptions( cmd );
- result = run( commandLine );
+ final int result = run( cmd, null );
if( result != 0 )
{
- String msg = "Failed executing: " + commandLine.toString();
- throw new TaskException( msg );
+ final String message = "Failed executing: " + cmd.toString();
+ throw new TaskException( message );
}
}
/**
- * Check the command line options.
- *
- * @param cmd Description of Parameter
+ * Build the command line options.
*/
- private void checkOptions( Commandline cmd )
+ private void checkOptions( final Commandline cmd )
{
-
- if( isRecurse() == true )
+ if( m_recurse == true )
{
cmd.createArgument().setValue( FLAG_RECURSE );
- }// end of if ()
+ }
- if( isVerbose() == true )
+ if( m_verbose == true )
{
cmd.createArgument().setValue( FLAG_VERBOSE );
- }// end of if ()
+ }
- if( getCcmProject() != null )
+ if( m_ccmProject != null )
{
cmd.createArgument().setValue( FLAG_PROJECT );
- cmd.createArgument().setValue( getCcmProject() );
+ cmd.createArgument().setValue( m_ccmProject );
}
-
}
-
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
index 2c28dad23..457e7771e 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
@@ -58,7 +58,9 @@ import org.apache.tools.ant.types.Path;
*
* @author Benoit Moussaud
*/
-public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler
+public class BorlandDeploymentTool
+ extends GenericDeploymentTool
+ implements ExecuteStreamHandler
{
public final static String PUBLICID_BORLAND_EJB
= "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
index 6db4ad7e5..5b96ba4ca 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
@@ -9,7 +9,6 @@ package org.apache.tools.ant.taskdefs.optional.ccm;
import java.io.File;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -111,8 +110,6 @@ public class CCMCheck extends Continuus
throws TaskException
{
Commandline commandLine = new Commandline();
- Project aProj = getProject();
- int result = 0;
// build the command line from what we got the format is
// ccm co /t .. files
@@ -122,11 +119,11 @@ public class CCMCheck extends Continuus
checkOptions( commandLine );
- result = run( commandLine );
+ final int result = run( commandLine, null );
if( result != 0 )
{
- String msg = "Failed executing: " + commandLine.toString();
- throw new TaskException( msg );
+ final String message = "Failed executing: " + commandLine.toString();
+ throw new TaskException( message );
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
index dc8843c3d..e1d4da59d 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.ccm;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -16,9 +15,9 @@ import org.apache.tools.ant.types.Commandline;
*
* @author Benoit Moussaud benoit.moussaud@criltelecom.com
*/
-public class CCMReconfigure extends Continuus
+public class CCMReconfigure
+ extends Continuus
{
-
/**
* /recurse --
*/
@@ -34,9 +33,9 @@ public class CCMReconfigure extends Continuus
*/
public final static String FLAG_PROJECT = "/project";
- private String project = null;
- private boolean recurse = false;
- private boolean verbose = false;
+ private String m_ccmProject;
+ private boolean m_recurse;
+ private boolean m_verbose;
public CCMReconfigure()
{
@@ -46,62 +45,26 @@ public class CCMReconfigure extends Continuus
/**
* Set the value of project.
- *
- * @param v Value to assign to project.
*/
- public void setCcmProject( String v )
+ public void setCcmProject( final String ccmProject )
{
- this.project = v;
+ m_ccmProject = ccmProject;
}
/**
* Set the value of recurse.
- *
- * @param v Value to assign to recurse.
*/
- public void setRecurse( boolean v )
+ public void setRecurse( final boolean recurse )
{
- this.recurse = v;
+ m_recurse = recurse;
}
/**
* Set the value of verbose.
- *
- * @param v Value to assign to verbose.
*/
- public void setVerbose( boolean v )
+ public void setVerbose( final boolean verbose )
{
- this.verbose = v;
- }
-
- /**
- * Get the value of project.
- *
- * @return value of project.
- */
- public String getCcmProject()
- {
- return project;
- }
-
- /**
- * Get the value of recurse.
- *
- * @return value of recurse.
- */
- public boolean isRecurse()
- {
- return recurse;
- }
-
- /**
- * Get the value of verbose.
- *
- * @return value of verbose.
- */
- public boolean isVerbose()
- {
- return verbose;
+ m_verbose = verbose;
}
/**
@@ -109,56 +72,47 @@ public class CCMReconfigure extends Continuus
*
* Builds a command line to execute ccm and then calls Exec's run method to
* execute the command line.
- *
- * @exception TaskException Description of Exception
*/
public void execute()
throws TaskException
{
- Commandline commandLine = new Commandline();
- Project aProj = getProject();
- int result = 0;
+ final Commandline cmd = new Commandline();
// build the command line from what we got the format
// as specified in the CCM.EXE help
- commandLine.setExecutable( getCcmCommand() );
- commandLine.createArgument().setValue( getCcmAction() );
+ cmd.setExecutable( getCcmCommand() );
+ cmd.createArgument().setValue( getCcmAction() );
- checkOptions( commandLine );
+ checkOptions( cmd );
- result = run( commandLine );
+ final int result = run( cmd, null );
if( result != 0 )
{
- String msg = "Failed executing: " + commandLine.toString();
- throw new TaskException( msg );
+ final String message = "Failed executing: " + cmd.toString();
+ throw new TaskException( message );
}
}
/**
- * Check the command line options.
- *
- * @param cmd Description of Parameter
+ * Build the command line options.
*/
- private void checkOptions( Commandline cmd )
+ private void checkOptions( final Commandline cmd )
{
-
- if( isRecurse() == true )
+ if( m_recurse == true )
{
cmd.createArgument().setValue( FLAG_RECURSE );
- }// end of if ()
+ }
- if( isVerbose() == true )
+ if( m_verbose == true )
{
cmd.createArgument().setValue( FLAG_VERBOSE );
- }// end of if ()
+ }
- if( getCcmProject() != null )
+ if( m_ccmProject != null )
{
cmd.createArgument().setValue( FLAG_PROJECT );
- cmd.createArgument().setValue( getCcmProject() );
+ cmd.createArgument().setValue( m_ccmProject );
}
-
}
-
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
index 2c28dad23..457e7771e 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
@@ -58,7 +58,9 @@ import org.apache.tools.ant.types.Path;
*
* @author Benoit Moussaud
*/
-public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler
+public class BorlandDeploymentTool
+ extends GenericDeploymentTool
+ implements ExecuteStreamHandler
{
public final static String PUBLICID_BORLAND_EJB
= "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";