mirror of https://github.com/apache/maven.git
[MNG-6816] Prefer System.lineSeparator() over system properties
This closes #300
This commit is contained in:
parent
11664b608c
commit
3332f4dbcc
|
@ -52,7 +52,7 @@ public class AbstractArtifactResolutionException
|
||||||
|
|
||||||
private final String path;
|
private final String path;
|
||||||
|
|
||||||
static final String LS = System.getProperty( "line.separator" );
|
static final String LS = System.lineSeparator();
|
||||||
|
|
||||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||||
protected AbstractArtifactResolutionException( String message,
|
protected AbstractArtifactResolutionException( String message,
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ModelValidationResult
|
||||||
{
|
{
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
private static final String NEWLINE = System.getProperty( "line.separator" );
|
private static final String LS = System.lineSeparator();
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
private List<String> messages;
|
private List<String> messages;
|
||||||
|
@ -80,13 +80,13 @@ public class ModelValidationResult
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// message.append( "There was " + messages.size() + " validation errors: " + NEWLINE );
|
// message.append( "There was " + messages.size() + " validation errors: " + LS );
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
for ( int i = 0; i < messages.size(); i++ )
|
for ( int i = 0; i < messages.size(); i++ )
|
||||||
{
|
{
|
||||||
message.append( indentation ).append( '[' ).append( i ).append( "] " ).append( messages.get( i ) ).append(
|
message.append( indentation ).append( '[' ).append( i ).append( "] " ).append( messages.get( i ) ).append(
|
||||||
NEWLINE );
|
LS );
|
||||||
}
|
}
|
||||||
|
|
||||||
return message.toString();
|
return message.toString();
|
||||||
|
|
|
@ -32,7 +32,7 @@ import junit.framework.TestCase;
|
||||||
public class ArtifactResolutionExceptionTest
|
public class ArtifactResolutionExceptionTest
|
||||||
extends TestCase
|
extends TestCase
|
||||||
{
|
{
|
||||||
private static final String LS = System.getProperty( "line.separator" );
|
private static final String LS = System.lineSeparator();
|
||||||
|
|
||||||
public void testMissingArtifactMessageFormat()
|
public void testMissingArtifactMessageFormat()
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,7 +53,7 @@ import org.codehaus.plexus.util.dag.CycleDetectedException;
|
||||||
public class PluginParameterExpressionEvaluatorTest
|
public class PluginParameterExpressionEvaluatorTest
|
||||||
extends AbstractCoreMavenComponentTestCase
|
extends AbstractCoreMavenComponentTestCase
|
||||||
{
|
{
|
||||||
private static final String FS = System.getProperty( "file.separator" );
|
private static final String FS = File.separator;
|
||||||
|
|
||||||
private RepositorySystem factory;
|
private RepositorySystem factory;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ import static org.mockito.Mockito.doThrow;
|
||||||
|
|
||||||
public class DefaultToolchainsBuilderTest
|
public class DefaultToolchainsBuilderTest
|
||||||
{
|
{
|
||||||
private static final String LS = System.getProperty( "line.separator" );
|
private static final String LS = System.lineSeparator();
|
||||||
|
|
||||||
@Spy
|
@Spy
|
||||||
private DefaultToolchainsReader toolchainsReader;
|
private DefaultToolchainsReader toolchainsReader;
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
public class ToolchainsBuildingExceptionTest
|
public class ToolchainsBuildingExceptionTest
|
||||||
{
|
{
|
||||||
private static final String LS = System.getProperty( "line.separator" );
|
private static final String LS = System.lineSeparator();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNoProblems()
|
public void testNoProblems()
|
||||||
|
|
|
@ -55,7 +55,7 @@ public final class CLIReportingUtils
|
||||||
|
|
||||||
public static String showVersion()
|
public static String showVersion()
|
||||||
{
|
{
|
||||||
final String ls = System.getProperty( "line.separator" );
|
final String ls = System.lineSeparator();
|
||||||
Properties properties = getBuildProperties();
|
Properties properties = getBuildProperties();
|
||||||
StringBuilder version = new StringBuilder( 256 );
|
StringBuilder version = new StringBuilder( 256 );
|
||||||
version.append( buffer().strong( createMavenVersionString( properties ) ) ).append( ls );
|
version.append( buffer().strong( createMavenVersionString( properties ) ) ).append( ls );
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class UnsupportedSlf4jBindingConfiguration
|
||||||
logger.warn( "The SLF4J binding actually used is not supported by Maven: {}", slf4jBinding );
|
logger.warn( "The SLF4J binding actually used is not supported by Maven: {}", slf4jBinding );
|
||||||
logger.warn( "Maven supported bindings are:" );
|
logger.warn( "Maven supported bindings are:" );
|
||||||
|
|
||||||
String ls = System.getProperty( "line.separator" );
|
String ls = System.lineSeparator();
|
||||||
|
|
||||||
for ( Map.Entry<URL, Set<Object>> entry : supported.entrySet() )
|
for ( Map.Entry<URL, Set<Object>> entry : supported.entrySet() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ import junit.framework.TestCase;
|
||||||
public class CLIManagerDocumentationTest
|
public class CLIManagerDocumentationTest
|
||||||
extends TestCase
|
extends TestCase
|
||||||
{
|
{
|
||||||
private final static String LS = System.getProperty( "line.separator" );
|
private final static String LS = System.lineSeparator();
|
||||||
|
|
||||||
private static class OptionComparator
|
private static class OptionComparator
|
||||||
implements Comparator<Option>
|
implements Comparator<Option>
|
||||||
|
|
Loading…
Reference in New Issue