You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2007/08/09 19:51:36 UTC
svn commit: r564310 -
/maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
Author: jdcasey
Date: Thu Aug 9 10:51:33 2007
New Revision: 564310
URL: http://svn.apache.org/viewvc?view=rev&rev=564310
Log:
fixing jdk 1.4 incompatibility.
Modified:
maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
Modified: maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java?view=diff&rev=564310&r1=564309&r2=564310
==============================================================================
--- maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java (original)
+++ maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java Thu Aug 9 10:51:33 2007
@@ -69,7 +69,7 @@
throw new IllegalStateException( "A logger instance is required." );
}
- if ( mavenHome == null && System.getProperty( "maven.home" ) == null )
+ if ( ( mavenHome == null ) && ( System.getProperty( "maven.home" ) == null ) )
{
throw new IllegalStateException( "Maven application directory was not "
+ "specified, and ${maven.home} is not provided in the system "
@@ -137,7 +137,7 @@
{
List goals = request.getGoals();
- if ( goals != null && !goals.isEmpty() )
+ if ( ( goals != null ) && !goals.isEmpty() )
{
cli.createArgument().setLine( StringUtils.join( goals.iterator(), " " ) );
}
@@ -375,7 +375,7 @@
}
}
- if ( mavenHome == null && System.getenv( "M2_HOME" ) != null )
+ if ( ( mavenHome == null ) && ( System.getenv( "M2_HOME" ) != null ) )
{
mavenHome = new File( System.getenv( "M2_HOME" ) );
}
@@ -416,13 +416,13 @@
/**
* Wraps a path with quotes to handle paths with spaces. If no spaces are found,
* the original string is returned.
- *
+ *
* @param path string to wrap if containing spaces
* @return quote wrapped string
*/
public String wrapStringWithQuotes( String path )
{
- if (path.contains( " " ))
+ if ( path.indexOf( " " ) > -1 )
{
return "\"" + path + "\"";
}