Skip to content

Commit

Permalink
Fix maven-checkstyle-plugin 3.1.1 reported error
Browse files Browse the repository at this point in the history
 - with maven-shared-resources v3
  • Loading branch information
slachiewicz committed Jun 11, 2020
1 parent 2537e53 commit b4725db
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
Expand All @@ -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 ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
Expand All @@ -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 ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
Expand All @@ -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 ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand All @@ -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 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
Expand All @@ -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 ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand All @@ -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 );
}
Expand Down

0 comments on commit b4725db

Please sign in to comment.