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 )
|
||||
{
|
||||
Snapshot snapshot;
|
||||
String lastUpdated = "";
|
||||
String lastUpdated;
|
||||
|
||||
if ( metadata.getVersioning() == null )
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ public class TransferListenerAdapter
|
|||
{
|
||||
ArtifactTransferEvent event = wrap( transferEvent );
|
||||
|
||||
Long transferred = null;
|
||||
Long transferred;
|
||||
synchronized ( transfers )
|
||||
{
|
||||
transferred = transfers.remove( transferEvent.getResource() );
|
||||
|
|
|
@ -87,11 +87,10 @@ implements Iterable<ArtifactMetadata>
|
|||
|
||||
MetadataTreeNode tree = null;
|
||||
MetadataTreeNode parent = null;
|
||||
MetadataTreeNode node = null;
|
||||
|
||||
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 )
|
||||
{
|
||||
tree = node;
|
||||
|
|
|
@ -70,9 +70,8 @@ public class DefaultClasspathTransformation
|
|||
{
|
||||
ClasspathGraphVisitor v = new ClasspathGraphVisitor( cleanGraph, cpc );
|
||||
MetadataGraphVertex entry = cleanGraph.getEntry();
|
||||
ArtifactMetadata md = entry.getMd();
|
||||
// entry point
|
||||
v.visit( entry ); // , md.getVersion(), md.getArtifactUri() );
|
||||
v.visit( entry );
|
||||
}
|
||||
|
||||
return cpc;
|
||||
|
|
|
@ -69,7 +69,7 @@ public class DefaultBeanConfigurator
|
|||
return;
|
||||
}
|
||||
|
||||
PlexusConfiguration plexusConfig = null;
|
||||
PlexusConfiguration plexusConfig;
|
||||
if ( configuration instanceof PlexusConfiguration )
|
||||
{
|
||||
plexusConfig = (PlexusConfiguration) configuration;
|
||||
|
|
|
@ -191,7 +191,7 @@ public class DefaultProjectBuilder
|
|||
|
||||
private DependencyResolutionResult resolveDependencies( MavenProject project, RepositorySystemSession session )
|
||||
{
|
||||
DependencyResolutionResult resolutionResult = null;
|
||||
DependencyResolutionResult resolutionResult;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -166,7 +166,7 @@ public class DefaultProjectBuildingHelper
|
|||
ProjectBuildingRequest request )
|
||||
throws PluginResolutionException, PluginVersionResolutionException
|
||||
{
|
||||
ClassRealm projectRealm = null;
|
||||
ClassRealm projectRealm;
|
||||
|
||||
List<Plugin> extensionPlugins = new ArrayList<Plugin>();
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ public class CLIManager
|
|||
|
||||
int cleanedSz = cleaned.size();
|
||||
|
||||
String[] cleanArgs = null;
|
||||
String[] cleanArgs;
|
||||
|
||||
if ( cleanedSz == 0 )
|
||||
{
|
||||
|
|
|
@ -389,7 +389,7 @@ public class MavenCli
|
|||
cliRequest.classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
|
||||
}
|
||||
|
||||
DefaultPlexusContainer container = null;
|
||||
DefaultPlexusContainer container;
|
||||
|
||||
ContainerConfiguration cc = new DefaultContainerConfiguration()
|
||||
.setClassWorld( cliRequest.classWorld )
|
||||
|
|
|
@ -33,7 +33,7 @@ public class Log4j2Configuration
|
|||
@Override
|
||||
public void setRootLoggerLevel( Level level )
|
||||
{
|
||||
String value = "info";
|
||||
String value;
|
||||
switch ( level )
|
||||
{
|
||||
case DEBUG:
|
||||
|
|
|
@ -35,7 +35,7 @@ public class LogbackConfiguration
|
|||
@Override
|
||||
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 )
|
||||
{
|
||||
case DEBUG:
|
||||
|
|
|
@ -35,7 +35,7 @@ public class Slf4jSimpleConfiguration
|
|||
@Override
|
||||
public void setRootLoggerLevel( Level level )
|
||||
{
|
||||
String value = "info";
|
||||
String value;
|
||||
switch ( level )
|
||||
{
|
||||
case DEBUG:
|
||||
|
|
Loading…
Reference in New Issue