mirror of https://github.com/apache/maven.git
Fix maven-checkstyle-plugin 3.1.1 reported error
- with maven-shared-resources v3
This commit is contained in:
parent
2537e5306c
commit
b4725dbe06
|
@ -50,7 +50,7 @@ public enum ArtifactScopeEnum
|
|||
/**
|
||||
* 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;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class DefaultMetadataReader
|
|||
{
|
||||
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 class DefaultMetadataReader
|
|||
{
|
||||
Objects.requireNonNull( input, "input cannot be null" );
|
||||
|
||||
try ( final InputStream in = input )
|
||||
try ( InputStream in = input )
|
||||
{
|
||||
return new MetadataXpp3Reader().read( in, isStrict( options ) );
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class DefaultToolchainsReader
|
|||
{
|
||||
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 class DefaultToolchainsReader
|
|||
{
|
||||
Objects.requireNonNull( input, "input cannot be null" );
|
||||
|
||||
try ( final InputStream in = input )
|
||||
try ( InputStream in = input )
|
||||
{
|
||||
return new MavenToolchainsXpp3Reader().read( in, isStrict( options ) );
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class DefaultToolchainsWriter implements ToolchainsWriter
|
|||
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 );
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class DefaultModelReader
|
|||
{
|
||||
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 class DefaultModelReader
|
|||
{
|
||||
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 ) );
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class DefaultModelWriter
|
|||
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 class DefaultModelWriter
|
|||
encoding = "UTF-8";
|
||||
}
|
||||
|
||||
try ( final Writer out = new OutputStreamWriter( output, encoding ) )
|
||||
try ( Writer out = new OutputStreamWriter( output, encoding ) )
|
||||
{
|
||||
write( out, options, model );
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ public class DefaultVersionRangeResolver
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ public class DefaultVersionResolver
|
|||
|
||||
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();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class DefaultSettingsReader
|
|||
{
|
||||
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 class DefaultSettingsReader
|
|||
{
|
||||
Objects.requireNonNull( input, "input cannot be null" );
|
||||
|
||||
try ( final InputStream in = input )
|
||||
try ( InputStream in = input )
|
||||
{
|
||||
return new SettingsXpp3Reader().read( in, isStrict( options ) );
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class DefaultSettingsWriter
|
|||
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 class DefaultSettingsWriter
|
|||
encoding = "UTF-8";
|
||||
}
|
||||
|
||||
try ( final Writer out = new OutputStreamWriter( output, encoding ) )
|
||||
try ( Writer out = new OutputStreamWriter( output, encoding ) )
|
||||
{
|
||||
write( out, options, settings );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue