Author: aheritier
Date: Fri Jul 21 14:37:20 2006
New Revision: 424460

URL: http://svn.apache.org/viewvc?rev=424460&view=rev
Log:
Apply m2 code style
Always place constants on the left side of equals()

Modified:
    
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/ArtifactDownloader.java
    
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapPomParser.java
    maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapTask.java
    maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/Dependency.java
    maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/HttpUtils.java
    maven/maven-1/core/trunk/src/java/org/apache/maven/cli/App.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/JellyBuildListener.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/jeez/MavenJeezTagLibrary.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/plugin/PluginScriptParser.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactFactory.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java
    maven/maven-1/core/trunk/src/java/org/apache/maven/util/DVSLPathTool.java
    maven/maven-1/core/trunk/src/java/org/apache/maven/util/HttpUtils.java
    
maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java

Modified: 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/ArtifactDownloader.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/ArtifactDownloader.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/ArtifactDownloader.java 
(original)
+++ 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/ArtifactDownloader.java 
Fri Jul 21 14:37:20 2006
@@ -167,7 +167,7 @@
                     url = replace( url, "http:/", "http://"; );
                 }
             }
-            else 
+            else
             {
                 // THe JDK URL for file: should have one or no / instead of // 
for some reason
                 url = replace( url, "file://", "file:" );
@@ -178,15 +178,8 @@
             try
             {
                 log( "Downloading " + url );
-                HttpUtils.getFile( url,
-                                   destinationFile,
-                                   ignoreErrors,
-                                   useTimestamp,
-                                   proxyHost,
-                                   proxyPort,
-                                   proxyUserName,
-                                   proxyPassword,
-                                   true );
+                HttpUtils.getFile( url, destinationFile, ignoreErrors, 
useTimestamp, proxyHost, proxyPort,
+                                   proxyUserName, proxyPassword, true );
 
                 // Artifact was found, continue checking additional remote 
repos (if any)
                 // in case there is a newer version (i.e. snapshots) in 
another repo
@@ -256,7 +249,7 @@
      *
      * @param proxyHost The proxyHost to set.
      */
-    protected void setProxyHost(String proxyHost)
+    protected void setProxyHost( String proxyHost )
     {
         this.proxyHost = proxyHost;
     }
@@ -276,7 +269,7 @@
      *
      * @param proxyPassword The proxyPassword to set.
      */
-    protected void setProxyPassword(String proxyPassword)
+    protected void setProxyPassword( String proxyPassword )
     {
         this.proxyPassword = proxyPassword;
     }
@@ -296,7 +289,7 @@
      *
      * @param proxyPort The proxyPort to set.
      */
-    protected void setProxyPort(String proxyPort)
+    protected void setProxyPort( String proxyPort )
     {
         this.proxyPort = proxyPort;
     }
@@ -316,7 +309,7 @@
      *
      * @param proxyUserName The proxyUserName to set.
      */
-    protected void setProxyUserName(String proxyUserName)
+    protected void setProxyUserName( String proxyUserName )
     {
         this.proxyUserName = proxyUserName;
     }

Modified: 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapPomParser.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapPomParser.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapPomParser.java 
(original)
+++ 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapPomParser.java 
Fri Jul 21 14:37:20 2006
@@ -82,7 +82,7 @@
      */
     public void startElement(String uri, String localName, String rawName, 
Attributes attributes)
     {
-        if (rawName.equals("dependency"))
+        if ("dependency".equals( rawName ))
         {
             currentDependency = new Dependency();
             insideDependency = true;
@@ -116,32 +116,32 @@
      */
     public void endElement(String uri, String localName, String rawName)
     {
-        if (rawName.equals("dependency"))
+        if ("dependency".equals( rawName ))
         {
             dependencies.add(currentDependency);
             insideDependency = false;
         }
-        else if (rawName.equals("id") && insideDependency)
+        else if ("id".equals( rawName ) && insideDependency)
         {
             currentDependency.setId(getBodyText());
         }
-        else if (rawName.equals("version") && insideDependency)
+        else if ("version".equals( rawName ) && insideDependency)
         {
             currentDependency.setVersion(getBodyText());
         }
-        else if (rawName.equals("jar") && insideDependency)
+        else if ("jar".equals( rawName ) && insideDependency)
         {
             currentDependency.setJar(getBodyText());
         }
-        else if (rawName.equals("type") && insideDependency)
+        else if ("type".equals( rawName ) && insideDependency)
         {
             currentDependency.setType(getBodyText());
         }
-        else if (rawName.equals("groupId") && insideDependency)
+        else if ("groupId".equals( rawName ) && insideDependency)
         {
             currentDependency.setGroupId(getBodyText());
         }
-        else if (rawName.equals("artifactId") && insideDependency)
+        else if ("artifactId".equals( rawName ) && insideDependency)
         {
             currentDependency.setArtifactId(getBodyText());
         }

Modified: 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapTask.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapTask.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapTask.java 
(original)
+++ maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/BootstrapTask.java 
Fri Jul 21 14:37:20 2006
@@ -39,30 +39,43 @@
 {
     /** the parser to load the pom */
     private BootstrapPomParser bootstrapPomParser;
+
     /** the pom to be bootstrapped */
     private File projectDescriptor;
+
     /** the dependencies of the pom */
     private List dependencies;
+
     /** the local repo of jars */
     private File mavenRepoLocal;
+
     /** whether to use the file timestamp when checking freshness */
     private boolean useTimestamp = true;
+
     /** whether to ignore errors on downloads */
     private boolean ignoreErrors = true;
+
     /** the url to download from */
     private String baseUrl;
+
     /** whether we've got 'net access */
     private String online;
+
     /** the proxy to use */
     private String proxyHost;
+
     /** the port to use on the proxy */
     private String proxyPort;
+
     /** the user name to use for the proxy */
     private String proxyUserName;
+
     /** the password to use for the proxy */
     private String proxyPassword;
+
     /** the NTLM login host. */
     private String loginHost = null;
+
     /** the NTLM login domain. */
     private String loginDomain = null;
 
@@ -284,8 +297,7 @@
 
         if ( mavenRepoLocal.exists() && !mavenRepoLocal.canWrite() )
         {
-            throw new BuildException( "Can't write to "
-                                      + mavenRepoLocal.getAbsolutePath() );
+            throw new BuildException( "Can't write to " + 
mavenRepoLocal.getAbsolutePath() );
         }
 
         System.out.println( "Using the following for your maven.repo.local: " 
+ mavenRepoLocal );
@@ -298,7 +310,7 @@
 
         List list = new ArrayList();
 
-        for ( Iterator i = dependencies.iterator(); i.hasNext();)
+        for ( Iterator i = dependencies.iterator(); i.hasNext(); )
         {
             Dependency d = (Dependency) i.next();
 
@@ -351,10 +363,10 @@
         try
         {
             ArtifactDownloader downloader = new ArtifactDownloader( 
mavenRepoLocal.getAbsolutePath(), repositoryUrls );
-            downloader.setProxyHost(proxyHost);
-            downloader.setProxyPort(proxyPort);
-            downloader.setProxyUserName(proxyUserName);
-            downloader.setProxyPassword(proxyPassword);
+            downloader.setProxyHost( proxyHost );
+            downloader.setProxyPort( proxyPort );
+            downloader.setProxyUserName( proxyUserName );
+            downloader.setProxyPassword( proxyPassword );
             downloader.downloadDependencies( getFiles() );
         }
         catch ( Exception e )
@@ -373,14 +385,11 @@
      * reference
      * @param baseDir the directory the specified jars are relative to
      */
-    public static void createClasspathReference( Project project,
-                                                 String reference,
-                                                 List list,
-                                                 File baseDir )
+    public static void createClasspathReference( Project project, String 
reference, List list, File baseDir )
     {
         Path classpath = new Path( project );
 
-        for ( Iterator i = list.iterator(); i.hasNext();)
+        for ( Iterator i = list.iterator(); i.hasNext(); )
         {
             String jar = (String) i.next();
             Path p = new Path( project );
@@ -400,15 +409,13 @@
      * @param list the list of lines (Strings) specifying include=, exclude= or
      *  a file name
      */
-    public static void createPatternSetReference( Project project,
-                                                  String reference,
-                                                  List list )
+    public static void createPatternSetReference( Project project, String 
reference, List list )
     {
         StringBuffer includesSb = new StringBuffer();
         StringBuffer excludesSb = new StringBuffer();
         PatternSet patternSet = new PatternSet();
 
-        for ( Iterator i = list.iterator(); i.hasNext();)
+        for ( Iterator i = list.iterator(); i.hasNext(); )
         {
             String line = (String) i.next();
             line = line.trim();

Modified: 
maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/Dependency.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/Dependency.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/Dependency.java 
(original)
+++ maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/Dependency.java Fri 
Jul 21 14:37:20 2006
@@ -279,7 +279,7 @@
     protected boolean isValid( String value )
     {
         if (    value != null
-             && !value.trim().equals("") )
+             && !"".equals( value.trim() ) )
         {
             return true;
         }

Modified: maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/HttpUtils.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/HttpUtils.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/HttpUtils.java 
(original)
+++ maven/maven-1/core/trunk/src/bootstrap/org/apache/maven/HttpUtils.java Fri 
Jul 21 14:37:20 2006
@@ -52,9 +52,7 @@
      * @throws SecurityException if an operation is not authorized by the
      *                           SecurityManager
      */
-    public static void useProxyUser( final String proxyHost,
-                                     final String proxyPort,
-                                     final String proxyUserName,
+    public static void useProxyUser( final String proxyHost, final String 
proxyPort, final String proxyUserName,
                                      final String proxyPassword )
     {
         if ( proxyHost != null && proxyPort != null )
@@ -69,8 +67,9 @@
                 {
                     protected PasswordAuthentication 
getPasswordAuthentication()
                     {
-                        return new PasswordAuthentication( proxyUserName,
-                                                           proxyPassword == 
null ? new char[0] : proxyPassword.toCharArray() );
+                        return new PasswordAuthentication( proxyUserName, 
proxyPassword == null ? new char[0]
+                                                                               
                : proxyPassword
+                                                                               
                    .toCharArray() );
                     }
                 } );
             }
@@ -97,26 +96,13 @@
      *                        artifact if it is available.
      * @throws IOException If an I/O exception occurs.
      */
-    public static void getFile( String url,
-                                File destinationFile,
-                                boolean ignoreErrors,
-                                boolean useTimestamp,
-                                String proxyHost,
-                                String proxyPort,
-                                String proxyUserName,
-                                String proxyPassword,
+    public static void getFile( String url, File destinationFile, boolean 
ignoreErrors, boolean useTimestamp,
+                                String proxyHost, String proxyPort, String 
proxyUserName, String proxyPassword,
                                 boolean useChecksum )
         throws IOException
     {
         // Get the requested file.
-        getFile( url,
-                 destinationFile,
-                 ignoreErrors,
-                 useTimestamp,
-                 proxyHost,
-                 proxyPort,
-                 proxyUserName,
-                 proxyPassword );
+        getFile( url, destinationFile, ignoreErrors, useTimestamp, proxyHost, 
proxyPort, proxyUserName, proxyPassword );
 
         // Get the checksum if requested.
         if ( useChecksum )
@@ -125,13 +111,7 @@
 
             try
             {
-                getFile( url + ".md5",
-                         checksumFile,
-                         ignoreErrors,
-                         useTimestamp,
-                         proxyHost,
-                         proxyPort,
-                         proxyUserName,
+                getFile( url + ".md5", checksumFile, ignoreErrors, 
useTimestamp, proxyHost, proxyPort, proxyUserName,
                          proxyPassword );
             }
             catch ( Exception e )
@@ -160,14 +140,8 @@
      *                        or null
      * @throws IOException If an I/O exception occurs.
      */
-    public static void getFile( String url,
-                                File destinationFile,
-                                boolean ignoreErrors,
-                                boolean useTimestamp,
-                                String proxyHost,
-                                String proxyPort,
-                                String proxyUserName,
-                                String proxyPassword )
+    public static void getFile( String url, File destinationFile, boolean 
ignoreErrors, boolean useTimestamp,
+                                String proxyHost, String proxyPort, String 
proxyUserName, String proxyPassword )
         throws IOException
     {
         //set the timestamp to the file date.
@@ -179,13 +153,7 @@
 
         try
         {
-            getFile( url,
-                     destinationFile,
-                     timestamp,
-                     proxyHost,
-                     proxyPort,
-                     proxyUserName,
-                     proxyPassword );
+            getFile( url, destinationFile, timestamp, proxyHost, proxyPort, 
proxyUserName, proxyPassword );
         }
         catch ( IOException ex )
         {
@@ -212,13 +180,8 @@
      *                        or null
      * @throws IOException If an I/O exception occurs.
      */
-    public static void getFile( String url,
-                                File destinationFile,
-                                long timestamp,
-                                String proxyHost,
-                                String proxyPort,
-                                String proxyUserName,
-                                String proxyPassword )
+    public static void getFile( String url, File destinationFile, long 
timestamp, String proxyHost, String proxyPort,
+                                String proxyUserName, String proxyPassword )
         throws IOException
     {
         String[] s = parseUrl( url );
@@ -258,8 +221,8 @@
             // test for 404 ourselves, and throw FileNotFoundException as 
needed
             if ( httpConnection.getResponseCode() == 
HttpURLConnection.HTTP_NOT_FOUND )
             {
-                throw new FileNotFoundException( url.toString() + " (HTTP 
Error: "
-                                                 + 
httpConnection.getResponseCode() + " " + httpConnection.getResponseMessage() + 
")" );
+                throw new FileNotFoundException( url.toString() + " (HTTP 
Error: " + httpConnection.getResponseCode()
+                    + " " + httpConnection.getResponseMessage() + ")" );
             }
             if ( httpConnection.getResponseCode() == 
HttpURLConnection.HTTP_NOT_MODIFIED )
             {
@@ -301,8 +264,7 @@
             throw isException;
         }
 
-        if ( connection.getLastModified() <= timestamp &&
-            connection.getLastModified() != 0 )
+        if ( connection.getLastModified() <= timestamp && 
connection.getLastModified() != 0 )
         {
             return;
         }

Modified: maven/maven-1/core/trunk/src/java/org/apache/maven/cli/App.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/cli/App.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/java/org/apache/maven/cli/App.java (original)
+++ maven/maven-1/core/trunk/src/java/org/apache/maven/cli/App.java Fri Jul 21 
14:37:20 2006
@@ -638,7 +638,7 @@
             {
                 log.error( MavenUtils.getMessage( "displayBugReportHelp.line4" 
) );
             }
-            if ( e.getMessage().equals( MavenUtils.MAVEN_UNKNOWN_ERROR ) )
+            if ( MavenUtils.MAVEN_UNKNOWN_ERROR.equals( e.getMessage() ) )
             {
                 displayBugReportHelp();
             }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/JellyBuildListener.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/JellyBuildListener.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/JellyBuildListener.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/JellyBuildListener.java
 Fri Jul 21 14:37:20 2006
@@ -105,19 +105,19 @@
 
             switch ( event.getPriority() )
             {
-                case ( Project.MSG_ERR   ):
+                case ( Project.MSG_ERR    ):
                     out.write( "[ERROR] " );
                     break;
-                case ( Project.MSG_WARN   ):
+                case ( Project.MSG_WARN    ):
                     // out.write( "[WARN] ");
                     break;
-                case ( Project.MSG_INFO   ):
+                case ( Project.MSG_INFO    ):
                     // normal, do nothing.
                     break;
-                case ( Project.MSG_VERBOSE   ):
+                case ( Project.MSG_VERBOSE    ):
                     out.write( "[VERBOSE] " );
                     break;
-                case ( Project.MSG_DEBUG   ):
+                case ( Project.MSG_DEBUG    ):
                     out.write( "[DEBUG] " );
                     break;
             }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/jeez/MavenJeezTagLibrary.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/jeez/MavenJeezTagLibrary.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/jeez/MavenJeezTagLibrary.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/jeez/MavenJeezTagLibrary.java
 Fri Jul 21 14:37:20 2006
@@ -51,11 +51,11 @@
     public TagScript createTagScript( String name, Attributes attrs )
         throws JellyException
     {
-        if ( name.equals( "goal" ) )
+        if ( "goal".equals( name ) )
         {
             return TagScript.newInstance( MavenGoalTag.class );
         }
-        else if ( name.equals( "attainGoal" ) )
+        else if ( "attainGoal".equals( name ) )
         {
             return TagScript.newInstance( MavenAttainGoalTag.class );
         }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java
 Fri Jul 21 14:37:20 2006
@@ -105,7 +105,7 @@
             {
                 StringBuffer targetDirectoryBuffer = new StringBuffer( todir );
                 String targetPath = resource.getTargetPath();
-                if ( targetPath != null && !targetPath.trim().equals( "" ) )
+                if ( targetPath != null && !"".equals( targetPath.trim() ) )
                 {
                     targetDirectoryBuffer.append( '/' ).append( targetPath );
                 }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java
 Fri Jul 21 14:37:20 2006
@@ -42,7 +42,7 @@
     public void doTag( XMLOutput output )
         throws JellyTagException
     {
-        if ( value == null || value.trim().equals( "" ) )
+        if ( value == null || "".equals( value.trim() ) )
         {
             if ( fail )
             {

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java
 Fri Jul 21 14:37:20 2006
@@ -50,7 +50,7 @@
         checkAttribute( user, "user" );
 
         user = user.trim();
-        if ( user.equals( "" ) || user.equals( UserCheck.NO_VALUE ) )
+        if ( "".equals( user ) || UserCheck.NO_VALUE.equals( user ) )
         {
             throw new JellyTagException( UserCheck.ERROR );
         }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/plugin/PluginScriptParser.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/plugin/PluginScriptParser.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/plugin/PluginScriptParser.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/plugin/PluginScriptParser.java
 Fri Jul 21 14:37:20 2006
@@ -76,7 +76,7 @@
      */
     public void startPrefixMapping( String prefix, String uri )
     {
-        if ( !prefix.equals( "" ) && !uri.startsWith( "jelly:" ) && 
!uri.startsWith( "dummy" ) && !uri.equals( "" ) )
+        if ( !"".equals( prefix ) && !uri.startsWith( "jelly:" ) && 
!uri.startsWith( "dummy" ) && !uri.equals( "" ) )
         {
             dynaTagLibDecls.add( uri );
             handler.addPluginDynaTagDep( jellyScriptHousing, uri );
@@ -145,7 +145,7 @@
                 }
             }
         }
-        if ( rawName.equals( "project" ) )
+        if ( "project".equals( rawName ) )
         {
             String defaultGoal = attributes.getValue( "default" );
 
@@ -156,7 +156,7 @@
                 handler.setDefaultGoalName( defaultGoal );
             }
         }
-        else if ( rawName.equals( "goal" ) )
+        else if ( "goal".equals( rawName ) )
         {
             String name = StringUtils.deleteWhitespace( attributes.getValue( 
"name" ) );
             String prereqs = attributes.getValue( "prereqs" );
@@ -164,21 +164,21 @@
 
             handler.addGoal( name, prereqs, description, jellyScriptHousing );
         }
-        else if ( rawName.equals( "preGoal" ) )
+        else if ( "preGoal".equals( rawName ) )
         {
             String name = attributes.getValue( "name" );
             handler.addPreGoal( name, jellyScriptHousing );
         }
-        else if ( rawName.equals( "postGoal" ) )
+        else if ( "postGoal".equals( rawName ) )
         {
             String name = attributes.getValue( "name" );
             handler.addPostGoal( name, jellyScriptHousing );
         }
-        else if ( rawName.equals( "attainGoal" ) )
+        else if ( "attainGoal".equals( rawName ) )
         {
             // Use lazy version
         }
-        else if ( localName.equals( "taglib" ) && uri.equals( "jelly:define" ) 
)
+        else if ( "taglib".equals( localName ) && uri.equals( "jelly:define" ) 
)
         {
             String tagLibUri = attributes.getValue( "uri" );
 

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactFactory.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactFactory.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactFactory.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactFactory.java
 Fri Jul 21 14:37:20 2006
@@ -45,7 +45,7 @@
         //!! I certainly have to revisit this. As sometimes we get
         // any of the following conditions satisfied.
         if ( dependency.getType() == null || 
dependency.getType().trim().length() == 0
-            || dependency.getType().equals( "jar" ) || 
dependency.getType().equals( "test" ) )
+            || "jar".equals( dependency.getType() ) || "test".equals( 
dependency.getType() ) )
         {
             dependency.setType( "jar" );
             return new GenericArtifact( dependency );

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java
 Fri Jul 21 14:37:20 2006
@@ -66,7 +66,7 @@
     /** @deprecated plugin, ejb and uberjar should provide their own 
implementation. */
     private String extensionForType( String type )
     {
-        if ( type.equals( "uberjar" ) || type.equals( "ejb" ) || type.equals( 
"plugin" ) )
+        if ( "uberjar".equals( type ) || "ejb".equals( type ) || 
"plugin".equals( type ) )
         {
             return ".jar";
         }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/util/DVSLPathTool.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/util/DVSLPathTool.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/java/org/apache/maven/util/DVSLPathTool.java 
(original)
+++ maven/maven-1/core/trunk/src/java/org/apache/maven/util/DVSLPathTool.java 
Fri Jul 21 14:37:20 2006
@@ -272,7 +272,7 @@
         }
 
         //If relativepath is current directory, just pass the link through
-        if ( relativePath.equals( "." ) )
+        if ( ".".equals( relativePath ) )
         {
             if ( link.startsWith( "/" ) )
             {

Modified: maven/maven-1/core/trunk/src/java/org/apache/maven/util/HttpUtils.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/util/HttpUtils.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/java/org/apache/maven/util/HttpUtils.java 
(original)
+++ maven/maven-1/core/trunk/src/java/org/apache/maven/util/HttpUtils.java Fri 
Jul 21 14:37:20 2006
@@ -151,7 +151,7 @@
         Repository repository = new Repository( "httputils", url );
 
         Wagon wagon;
-        if ( repository.getProtocol().equals( "http" ) )
+        if ( "http".equals( repository.getProtocol() ) )
         {
             wagon = new HttpWagon();
         }

Modified: 
maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java
URL: 
http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java?rev=424460&r1=424459&r2=424460&view=diff
==============================================================================
--- 
maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java
 (original)
+++ 
maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java
 Fri Jul 21 14:37:20 2006
@@ -224,11 +224,11 @@
             String overrideType = artifact.getOverrideType();
             if ( overrideType != Artifact.OVERRIDE_NONE )
             {
-                if ( overrideType.equals( Artifact.OVERRIDE_VERSION ) )
+                if ( Artifact.OVERRIDE_VERSION.equals( overrideType ) )
                 {
                     message.append( "; version override doesn't exist: " + 
artifact.getDependency().getVersion() );
                 }
-                else if ( overrideType.equals( Artifact.OVERRIDE_PATH ) )
+                else if ( Artifact.OVERRIDE_PATH.equals( overrideType ) )
                 {
                     message.append( "; path override doesn't exist: " + 
artifact.getPath() );
                 }
@@ -362,11 +362,11 @@
 
         TransferListener listener = null;
 
-        if ( meterType.equals( "bootstrap" ) )
+        if ( "bootstrap".equals( meterType ) )
         {
             listener = new BootstrapDownloadMeter();
         }
-        else if ( meterType.equals( "console" ) )
+        else if ( "console".equals( meterType ) )
         {
             listener = new ConsoleDownloadMeter();
         }


Reply via email to