Remove dead code (initializers)

This commit is contained in:
Stephen Connolly 2014-01-06 11:21:26 +00:00
parent cefae8d47e
commit 5f29be799f
12 changed files with 12 additions and 14 deletions

View File

@ -68,7 +68,7 @@ final class RemoteSnapshotMetadata
protected void merge( Metadata recessive )
{
Snapshot snapshot;
String lastUpdated = "";
String lastUpdated;
if ( metadata.getVersioning() == null )
{

View File

@ -67,7 +67,7 @@ public class TransferListenerAdapter
{
ArtifactTransferEvent event = wrap( transferEvent );
Long transferred = null;
Long transferred;
synchronized ( transfers )
{
transferred = transfers.remove( transferEvent.getResource() );

View File

@ -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;

View File

@ -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;

View File

@ -69,7 +69,7 @@ public class DefaultBeanConfigurator
return;
}
PlexusConfiguration plexusConfig = null;
PlexusConfiguration plexusConfig;
if ( configuration instanceof PlexusConfiguration )
{
plexusConfig = (PlexusConfiguration) configuration;

View File

@ -191,7 +191,7 @@ public class DefaultProjectBuilder
private DependencyResolutionResult resolveDependencies( MavenProject project, RepositorySystemSession session )
{
DependencyResolutionResult resolutionResult = null;
DependencyResolutionResult resolutionResult;
try
{

View File

@ -166,7 +166,7 @@ public class DefaultProjectBuildingHelper
ProjectBuildingRequest request )
throws PluginResolutionException, PluginVersionResolutionException
{
ClassRealm projectRealm = null;
ClassRealm projectRealm;
List<Plugin> extensionPlugins = new ArrayList<Plugin>();

View File

@ -235,7 +235,7 @@ public class CLIManager
int cleanedSz = cleaned.size();
String[] cleanArgs = null;
String[] cleanArgs;
if ( cleanedSz == 0 )
{

View File

@ -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 )

View File

@ -33,7 +33,7 @@ public class Log4j2Configuration
@Override
public void setRootLoggerLevel( Level level )
{
String value = "info";
String value;
switch ( level )
{
case DEBUG:

View File

@ -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:

View File

@ -35,7 +35,7 @@ public class Slf4jSimpleConfiguration
@Override
public void setRootLoggerLevel( Level level )
{
String value = "info";
String value;
switch ( level )
{
case DEBUG: