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 ) protected void merge( Metadata recessive )
{ {
Snapshot snapshot; Snapshot snapshot;
String lastUpdated = ""; String lastUpdated;
if ( metadata.getVersioning() == null ) if ( metadata.getVersioning() == null )
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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