Fix maven-checkstyle-plugin 3.1.1 reported error

- with maven-shared-resources v3
This commit is contained in:
Sylwester Lachiewicz 2020-06-05 18:44:52 +02:00
parent 2537e5306c
commit b4725dbe06
10 changed files with 16 additions and 16 deletions

View File

@ -50,7 +50,7 @@ int getId()
/**
* Helper method to simplify null processing
*/
public static final ArtifactScopeEnum checkScope( ArtifactScopeEnum scope )
public static ArtifactScopeEnum checkScope( ArtifactScopeEnum scope )
{
return scope == null ? DEFAULT_SCOPE : scope;
}

View File

@ -60,7 +60,7 @@ public Metadata read( Reader input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final Reader in = input )
try ( Reader in = input )
{
return new MetadataXpp3Reader().read( in, isStrict( options ) );
}
@ -75,7 +75,7 @@ public Metadata read( InputStream input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final InputStream in = input )
try ( InputStream in = input )
{
return new MetadataXpp3Reader().read( in, isStrict( options ) );
}

View File

@ -61,7 +61,7 @@ public PersistedToolchains read( Reader input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final Reader in = input )
try ( Reader in = input )
{
return new MavenToolchainsXpp3Reader().read( in, isStrict( options ) );
}
@ -77,7 +77,7 @@ public PersistedToolchains read( InputStream input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final InputStream in = input )
try ( InputStream in = input )
{
return new MavenToolchainsXpp3Reader().read( in, isStrict( options ) );
}

View File

@ -46,7 +46,7 @@ public void write( Writer output, Map<String, Object> options, PersistedToolchai
Objects.requireNonNull( output, "output cannot be null" );
Objects.requireNonNull( toolchains, "toolchains cannot be null" );
try ( final Writer out = output )
try ( Writer out = output )
{
new MavenToolchainsXpp3Writer().write( out, toolchains );
}

View File

@ -68,7 +68,7 @@ public Model read( Reader input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final Reader in = input )
try ( Reader in = input )
{
return read( in, isStrict( options ), getSource( options ) );
}
@ -80,7 +80,7 @@ public Model read( InputStream input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final XmlStreamReader in = ReaderFactory.newXmlReader( input ) )
try ( XmlStreamReader in = ReaderFactory.newXmlReader( input ) )
{
return read( in, isStrict( options ), getSource( options ) );
}

View File

@ -64,7 +64,7 @@ public void write( Writer output, Map<String, Object> options, Model model )
Objects.requireNonNull( output, "output cannot be null" );
Objects.requireNonNull( model, "model cannot be null" );
try ( final Writer out = output )
try ( Writer out = output )
{
new MavenXpp3Writer().write( out, model );
}
@ -84,7 +84,7 @@ public void write( OutputStream output, Map<String, Object> options, Model model
encoding = "UTF-8";
}
try ( final Writer out = new OutputStreamWriter( output, encoding ) )
try ( Writer out = new OutputStreamWriter( output, encoding ) )
{
write( out, options, model );
}

View File

@ -244,7 +244,7 @@ private Versioning readVersions( RepositorySystemSession session, RequestTrace t
if ( metadata.getFile() != null && metadata.getFile().exists() )
{
try ( final InputStream in = new FileInputStream( metadata.getFile() ) )
try ( InputStream in = new FileInputStream( metadata.getFile() ) )
{
versioning = new MetadataXpp3Reader().read( in, false ).getVersioning();
}

View File

@ -310,7 +310,7 @@ private Versioning readVersions( RepositorySystemSession session, RequestTrace t
if ( metadata.getFile() != null && metadata.getFile().exists() )
{
try ( final InputStream in = new FileInputStream( metadata.getFile() ) )
try ( InputStream in = new FileInputStream( metadata.getFile() ) )
{
versioning = new MetadataXpp3Reader().read( in, false ).getVersioning();

View File

@ -62,7 +62,7 @@ public Settings read( Reader input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final Reader in = input )
try ( Reader in = input )
{
return new SettingsXpp3Reader().read( in, isStrict( options ) );
}
@ -78,7 +78,7 @@ public Settings read( InputStream input, Map<String, ?> options )
{
Objects.requireNonNull( input, "input cannot be null" );
try ( final InputStream in = input )
try ( InputStream in = input )
{
return new SettingsXpp3Reader().read( in, isStrict( options ) );
}

View File

@ -64,7 +64,7 @@ public void write( Writer output, Map<String, Object> options, Settings settings
Objects.requireNonNull( output, "output cannot be null" );
Objects.requireNonNull( settings, "settings cannot be null" );
try ( final Writer out = output )
try ( Writer out = output )
{
new SettingsXpp3Writer().write( out, settings );
}
@ -84,7 +84,7 @@ public void write( OutputStream output, Map<String, Object> options, Settings se
encoding = "UTF-8";
}
try ( final Writer out = new OutputStreamWriter( output, encoding ) )
try ( Writer out = new OutputStreamWriter( output, encoding ) )
{
write( out, options, settings );
}