fixed errors reported by Checkstyle

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@813615 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Herve Boutemy 2009-09-10 22:05:49 +00:00
parent b82977a18c
commit af5b761568
6 changed files with 109 additions and 86 deletions

View File

@ -1,5 +1,24 @@
package org.apache.maven.cli;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.io.IOException;
import java.io.InputStream;
import java.text.DateFormat;
@ -60,8 +79,8 @@ public final class CLIReportingUtils
System.out.println( "Default locale: " + Locale.getDefault() + ", platform encoding: "
+ System.getProperty( "file.encoding", "<unknown encoding>" ) );
System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION +
"\" arch: \"" + Os.OS_ARCH + "\" Family: \"" + Os.OS_FAMILY + "\"" );
System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION
+ "\" arch: \"" + Os.OS_ARCH + "\" Family: \"" + Os.OS_FAMILY + "\"" );
}
private static String reduce( String s )

View File

@ -68,8 +68,8 @@ final class CLIRequestUtils
boolean pluginUpdateOverride = false;
if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES ) ||
commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) )
if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES )
|| commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) )
{
pluginUpdateOverride = true;
}
@ -151,7 +151,7 @@ final class CLIRequestUtils
String [] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES );
if ( profileOptionValues != null )
{
for ( int i=0; i < profileOptionValues.length; ++i )
for ( int i = 0; i < profileOptionValues.length; ++i )
{
StringTokenizer profileTokens = new StringTokenizer( profileOptionValues[i] , "," );

View File

@ -53,8 +53,8 @@ public class ConsoleDownloadMonitor
if ( total >= 1024 )
{
System.out.print(
( complete / 1024 ) + "/" + ( total == WagonConstants.UNKNOWN_LENGTH ? "?" : ( total / 1024 ) + "K" ) +
"\r" );
( complete / 1024 ) + "/" + ( total == WagonConstants.UNKNOWN_LENGTH ? "?" : ( total / 1024 ) + "K" )
+ "\r" );
}
else
{

View File

@ -1,18 +1,22 @@
package org.apache.maven.embedder.execution;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.io.File;

View File

@ -206,7 +206,7 @@ public abstract class AbstractCoreMavenComponentTestCase
//
public ProjectBuilder addDependency( String groupId, String artifactId, String version, String scope )
{
return addDependency( groupId, artifactId, version, scope, (Exclusion)null );
return addDependency( groupId, artifactId, version, scope, (Exclusion) null );
}
public ProjectBuilder addDependency( String groupId, String artifactId, String version, String scope, Exclusion exclusion )

View File

@ -86,7 +86,7 @@ public class MavenEmbedderTest
}
System.err.println( "Encountered " + exceptions.size() + " exception(s)." );
for (Exception exception : exceptions)
for ( Exception exception : exceptions )
{
exception.printStackTrace( System.err );
}
@ -109,11 +109,11 @@ public class MavenEmbedderTest
MavenExecutionResult result = mavenEmbedder.execute( request );
List<Exception> exceptions = result.getExceptions();
assertEquals("Incorrect number of exceptions", 1, exceptions.size());
assertEquals( "Incorrect number of exceptions", 1, exceptions.size() );
if ( ( exceptions.get( 0 ) instanceof NullPointerException ) )
{
fail("Null Pointer on Exception");
fail( "Null Pointer on Exception" );
}
}