mirror of https://github.com/apache/maven.git
Remove dead code (initializers)
This commit is contained in:
parent
cefae8d47e
commit
5f29be799f
|
@ -68,7 +68,7 @@ final class RemoteSnapshotMetadata
|
||||||
protected void merge( Metadata recessive )
|
protected void merge( Metadata recessive )
|
||||||
{
|
{
|
||||||
Snapshot snapshot;
|
Snapshot snapshot;
|
||||||
String lastUpdated = "";
|
String lastUpdated;
|
||||||
|
|
||||||
if ( metadata.getVersioning() == null )
|
if ( metadata.getVersioning() == null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class TransferListenerAdapter
|
||||||
{
|
{
|
||||||
ArtifactTransferEvent event = wrap( transferEvent );
|
ArtifactTransferEvent event = wrap( transferEvent );
|
||||||
|
|
||||||
Long transferred = null;
|
Long transferred;
|
||||||
synchronized ( transfers )
|
synchronized ( transfers )
|
||||||
{
|
{
|
||||||
transferred = transfers.remove( transferEvent.getResource() );
|
transferred = transfers.remove( transferEvent.getResource() );
|
||||||
|
|
|
@ -87,11 +87,10 @@ implements Iterable<ArtifactMetadata>
|
||||||
|
|
||||||
MetadataTreeNode tree = null;
|
MetadataTreeNode tree = null;
|
||||||
MetadataTreeNode parent = null;
|
MetadataTreeNode parent = null;
|
||||||
MetadataTreeNode node = null;
|
|
||||||
|
|
||||||
for ( ArtifactMetadata md : classpath )
|
for ( ArtifactMetadata md : classpath )
|
||||||
{
|
{
|
||||||
node = new MetadataTreeNode( md, parent, md.isResolved(), md.getArtifactScope() );
|
MetadataTreeNode node = new MetadataTreeNode( md, parent, md.isResolved(), md.getArtifactScope() );
|
||||||
if ( tree == null )
|
if ( tree == null )
|
||||||
{
|
{
|
||||||
tree = node;
|
tree = node;
|
||||||
|
|
|
@ -70,9 +70,8 @@ public class DefaultClasspathTransformation
|
||||||
{
|
{
|
||||||
ClasspathGraphVisitor v = new ClasspathGraphVisitor( cleanGraph, cpc );
|
ClasspathGraphVisitor v = new ClasspathGraphVisitor( cleanGraph, cpc );
|
||||||
MetadataGraphVertex entry = cleanGraph.getEntry();
|
MetadataGraphVertex entry = cleanGraph.getEntry();
|
||||||
ArtifactMetadata md = entry.getMd();
|
|
||||||
// entry point
|
// entry point
|
||||||
v.visit( entry ); // , md.getVersion(), md.getArtifactUri() );
|
v.visit( entry );
|
||||||
}
|
}
|
||||||
|
|
||||||
return cpc;
|
return cpc;
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class DefaultBeanConfigurator
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlexusConfiguration plexusConfig = null;
|
PlexusConfiguration plexusConfig;
|
||||||
if ( configuration instanceof PlexusConfiguration )
|
if ( configuration instanceof PlexusConfiguration )
|
||||||
{
|
{
|
||||||
plexusConfig = (PlexusConfiguration) configuration;
|
plexusConfig = (PlexusConfiguration) configuration;
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class DefaultProjectBuilder
|
||||||
|
|
||||||
private DependencyResolutionResult resolveDependencies( MavenProject project, RepositorySystemSession session )
|
private DependencyResolutionResult resolveDependencies( MavenProject project, RepositorySystemSession session )
|
||||||
{
|
{
|
||||||
DependencyResolutionResult resolutionResult = null;
|
DependencyResolutionResult resolutionResult;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class DefaultProjectBuildingHelper
|
||||||
ProjectBuildingRequest request )
|
ProjectBuildingRequest request )
|
||||||
throws PluginResolutionException, PluginVersionResolutionException
|
throws PluginResolutionException, PluginVersionResolutionException
|
||||||
{
|
{
|
||||||
ClassRealm projectRealm = null;
|
ClassRealm projectRealm;
|
||||||
|
|
||||||
List<Plugin> extensionPlugins = new ArrayList<Plugin>();
|
List<Plugin> extensionPlugins = new ArrayList<Plugin>();
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ public class CLIManager
|
||||||
|
|
||||||
int cleanedSz = cleaned.size();
|
int cleanedSz = cleaned.size();
|
||||||
|
|
||||||
String[] cleanArgs = null;
|
String[] cleanArgs;
|
||||||
|
|
||||||
if ( cleanedSz == 0 )
|
if ( cleanedSz == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -389,7 +389,7 @@ public class MavenCli
|
||||||
cliRequest.classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
|
cliRequest.classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultPlexusContainer container = null;
|
DefaultPlexusContainer container;
|
||||||
|
|
||||||
ContainerConfiguration cc = new DefaultContainerConfiguration()
|
ContainerConfiguration cc = new DefaultContainerConfiguration()
|
||||||
.setClassWorld( cliRequest.classWorld )
|
.setClassWorld( cliRequest.classWorld )
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class Log4j2Configuration
|
||||||
@Override
|
@Override
|
||||||
public void setRootLoggerLevel( Level level )
|
public void setRootLoggerLevel( Level level )
|
||||||
{
|
{
|
||||||
String value = "info";
|
String value;
|
||||||
switch ( level )
|
switch ( level )
|
||||||
{
|
{
|
||||||
case DEBUG:
|
case DEBUG:
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class LogbackConfiguration
|
||||||
@Override
|
@Override
|
||||||
public void setRootLoggerLevel( Level level )
|
public void setRootLoggerLevel( Level level )
|
||||||
{
|
{
|
||||||
ch.qos.logback.classic.Level value = ch.qos.logback.classic.Level.INFO;
|
ch.qos.logback.classic.Level value;
|
||||||
switch ( level )
|
switch ( level )
|
||||||
{
|
{
|
||||||
case DEBUG:
|
case DEBUG:
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class Slf4jSimpleConfiguration
|
||||||
@Override
|
@Override
|
||||||
public void setRootLoggerLevel( Level level )
|
public void setRootLoggerLevel( Level level )
|
||||||
{
|
{
|
||||||
String value = "info";
|
String value;
|
||||||
switch ( level )
|
switch ( level )
|
||||||
{
|
{
|
||||||
case DEBUG:
|
case DEBUG:
|
||||||
|
|
Loading…
Reference in New Issue