dion 2004/01/07 16:53:49
Modified: src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH
GoalToJellyScriptHousingMapper.java
Log:
Code cleanup
Revision Changes Path
No revision
No revision
1.3.4.3 +33 -27
maven/src/java/org/apache/maven/plugin/Attic/GoalToJellyScriptHousingMapper.java
Index: GoalToJellyScriptHousingMapper.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/plugin/Attic/GoalToJellyScriptHousingMapper.java,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -u -r1.3.4.2 -r1.3.4.3
--- GoalToJellyScriptHousingMapper.java 31 Dec 2003 01:40:26 -0000 1.3.4.2
+++ GoalToJellyScriptHousingMapper.java 8 Jan 2004 00:53:49 -0000 1.3.4.3
@@ -52,6 +52,8 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
+ * ====================================================================
*/
import com.werken.werkz.CyclicGoalChainException;
@@ -90,9 +92,11 @@
* <p/>
* For a single goal we will collect the set of goals that will be executed with
* it.
- *
+ *
* @todo separate parser
- * @todo this is trying to achieve too many goals: parser itself, goal mapping, and
dependency resolver for plugins. Split them up into parser, cache/mapping classes,
with the cache/mapping performing the two roles of mapping and dependency resolution
in a separate fashion
+ * @todo this is trying to achieve too many goals: parser itself, goal mapping, and
dependency resolver for plugins.
+ * Split them up into parser, cache/mapping classes, with the cache/mapping
performing the
+ * two roles of mapping and dependency resolution in a separate fashion
* @todo kill the unused, unneeded accessors!
*/
public class GoalToJellyScriptHousingMapper extends DefaultHandler
@@ -135,9 +139,10 @@
/**
* Merge parent mapper. Used to setup a transient submapper.
- *
+ *
* @param mapper mapper to copy from
- * @todo figure out which are actually needed, change redundant initialisers by
removing here, or adding others to default constructor (eg goalProject init)
+ * @todo figure out which are actually needed, change redundant initialisers by
removing here,
+ * or adding others to default constructor (eg goalProject init)
* @todo We should have a way to inherit entire werkz project instead of hokey
goal copying
*/
void merge( GoalToJellyScriptHousingMapper mapper ) throws
CyclicGoalChainException
@@ -146,32 +151,32 @@
mergeMap( pluginDynaTagDepsMap, mapper.pluginDynaTagDepsMap );
mergeMap( goalPluginMap, mapper.goalPluginMap );
- for ( Iterator i = mapper.preGoalDecoratorsMap.keySet().iterator();
i.hasNext(); )
+ for ( Iterator i = mapper.preGoalDecoratorsMap.keySet().iterator();
i.hasNext();)
{
String goalName = ( String ) i.next();
Set s = ( Set ) mapper.preGoalDecoratorsMap.get( goalName );
- Set s_exist = ( Set ) preGoalDecoratorsMap.get( goalName );
- if ( s_exist == null )
+ Set sExist = ( Set ) preGoalDecoratorsMap.get( goalName );
+ if ( sExist == null )
{
preGoalDecoratorsMap.put( goalName, s );
}
else
{
- s_exist.addAll( s );
+ sExist.addAll( s );
}
}
- for ( Iterator i = mapper.postGoalDecoratorsMap.keySet().iterator();
i.hasNext(); )
+ for ( Iterator i = mapper.postGoalDecoratorsMap.keySet().iterator();
i.hasNext();)
{
String goalName = ( String ) i.next();
Set s = ( Set ) mapper.postGoalDecoratorsMap.get( goalName );
- Set s_exist = ( Set ) postGoalDecoratorsMap.get( goalName );
- if ( s_exist == null )
+ Set sExist = ( Set ) postGoalDecoratorsMap.get( goalName );
+ if ( sExist == null )
{
postGoalDecoratorsMap.put( goalName, s );
}
else
{
- s_exist.addAll( s );
+ sExist.addAll( s );
}
}
@@ -180,7 +185,7 @@
defaultGoalName = mapper.defaultGoalName;
}
- for ( Iterator i = mapper.goalProject.getGoals().iterator(); i.hasNext(); )
+ for ( Iterator i = mapper.goalProject.getGoals().iterator(); i.hasNext();)
{
Goal goal = ( Goal ) i.next();
Goal existingGoal = goalProject.getGoal( goal.getName() );
@@ -190,11 +195,11 @@
}
else
{
- for ( Iterator j = goal.getPrecursors().iterator(); j.hasNext(); )
+ for ( Iterator j = goal.getPrecursors().iterator(); j.hasNext();)
{
existingGoal.addPrecursor( ( Goal ) j.next() );
}
- for ( Iterator j = goal.getPostcursors().iterator(); j.hasNext(); )
+ for ( Iterator j = goal.getPostcursors().iterator(); j.hasNext();)
{
existingGoal.addPostcursor( ( Goal ) j.next() );
}
@@ -373,7 +378,7 @@
List precursors = goal.getPrecursors();
- for ( Iterator i = precursors.iterator(); i.hasNext(); )
+ for ( Iterator i = precursors.iterator(); i.hasNext();)
{
Goal eachPrecursor = ( Goal ) i.next();
@@ -397,12 +402,12 @@
{
Set resolvedDynaTagPlugins = new HashSet();
- for ( Iterator i = plugins.iterator(); i.hasNext(); )
+ for ( Iterator i = plugins.iterator(); i.hasNext();)
{
JellyScriptHousing plugin = ( JellyScriptHousing ) i.next();
Set dynaTagDeps = getPluginDynaTagDeps( plugin );
- for ( Iterator j = dynaTagDeps.iterator(); j.hasNext(); )
+ for ( Iterator j = dynaTagDeps.iterator(); j.hasNext();)
{
LinkedList dynaTagUris = new LinkedList();
Set seen = new HashSet();
@@ -410,7 +415,7 @@
Object next = j.next();
dynaTagUris.add( next );
- while ( dynaTagUris.isEmpty() == false )
+ while ( !dynaTagUris.isEmpty() )
{
String dynaTagUri = ( String ) dynaTagUris.removeFirst();
@@ -424,9 +429,10 @@
Object dynaTagPluginHome = dynaTagPluginMap.get( dynaTagUri );
if ( dynaTagPluginHome == null )
{
- // This is essentially allowed for bootstrap so
+ // This is essentially allowed for bootstrap so
// plugins can import taglibs they don't use until later
- log.warn( "Tag library requested that is not present: '" +
dynaTagUri + "' in plugin: '" + plugin.getId() + "'" );
+ log.warn( "Tag library requested that is not present: '" +
dynaTagUri
+ + "' in plugin: '" + plugin.getId() + "'" );
}
else
{
@@ -453,13 +459,13 @@
* within Maven) has a dependency on the dyna tag lib named 'doc'. We need to
* make sure that this dyna tag lib is ready for use when the plugin.jelly
* jellyScriptHousing is run.
- *
+ *
* @param prefix Prefix to be used in the jelly jellyScriptHousing.
* @param uri Uri of the dyna tag lib.
*/
public void startPrefixMapping( String prefix, String uri )
{
- if ( prefix.equals( "" ) == false && uri.startsWith( "jelly:" ) == false &&
uri.startsWith( "dummy" ) == false && uri.equals( "" ) == false )
+ if ( !prefix.equals( "" ) && !uri.startsWith( "jelly:" ) &&
!uri.startsWith( "dummy" ) && !uri.equals( "" ) )
{
getPluginDynaTagDeps( getJellyScriptHousing() ).add( uri );
}
@@ -591,7 +597,7 @@
/**
* Warning callback.
- *
+ *
* @param spe The parse exception that caused the callback to be invoked.
*/
public void warning( SAXParseException spe )
@@ -601,7 +607,7 @@
/**
* Error callback.
- *
+ *
* @param spe The parse exception that caused the callback to be invoked.
*/
public void error( SAXParseException spe )
@@ -611,7 +617,7 @@
/**
* Fatal error callback.
- *
+ *
* @param spe The parse exception that caused the callback to be invoked.
*/
public void fatalError( SAXParseException spe )
@@ -629,7 +635,7 @@
}
/**
- * @return
+ * @return
*/
Set getGoalNames()
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]