You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/08/05 20:24:07 UTC
svn commit: r682848 -
/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
Author: bentmann
Date: Tue Aug 5 11:24:07 2008
New Revision: 682848
URL: http://svn.apache.org/viewvc?rev=682848&view=rev
Log:
[MINVOKER-45] External properties file is ignored if parameter testProperties is not defined
Modified:
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
Modified: maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java?rev=682848&r1=682847&r2=682848&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java Tue Aug 5 11:24:07 2008
@@ -861,26 +861,25 @@
private Properties loadTestProperties( final File basedir )
throws IOException
{
- if ( testProperties == null )
- {
- return new Properties();
- }
- final File testProperties = new File( basedir, testPropertiesFile );
-
final Properties testProps = new Properties();
- if ( testProperties.exists() )
+ if ( testPropertiesFile != null )
{
- FileInputStream fin = null;
- try
- {
- fin = new FileInputStream( testProperties );
+ final File testProperties = new File( basedir, testPropertiesFile );
- testProps.load( fin );
- }
- finally
+ if ( testProperties.exists() )
{
- IOUtil.close( fin );
+ InputStream fin = null;
+ try
+ {
+ fin = new FileInputStream( testProperties );
+
+ testProps.load( fin );
+ }
+ finally
+ {
+ IOUtil.close( fin );
+ }
}
}