ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject [10/12] git commit: cleanup
Date Thu, 28 Aug 2014 07:04:51 GMT
cleanup


Project: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/commit/eb500512
Tree: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/tree/eb500512
Diff: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/diff/eb500512

Branch: refs/heads/master
Commit: eb5005126402faa7271d29cbc88e657cc9817df4
Parents: bb7e81a
Author: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Authored: Thu Aug 28 08:59:00 2014 +0200
Committer: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Committed: Thu Aug 28 08:59:00 2014 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/easyant/core/EasyAntEngine.java       | 6 +++---
 src/main/java/org/apache/easyant/core/EasyAntMain.java         | 4 ++--
 .../apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java | 2 +-
 .../easyant/core/ant/listerners/BuildExecutionTimer.java       | 2 +-
 .../easyant/core/services/impl/DefaultPluginServiceImpl.java   | 2 +-
 src/main/java/org/apache/easyant/tasks/AbstractImport.java     | 2 +-
 src/main/java/org/apache/easyant/tasks/GoOffline.java          | 2 +-
 src/main/java/org/apache/easyant/tasks/Import.java             | 2 +-
 src/main/java/org/apache/easyant/tasks/ImportDeferred.java     | 2 +-
 src/main/java/org/apache/easyant/tasks/LoadModule.java         | 4 ++--
 src/main/java/org/apache/easyant/tasks/SearchModule.java       | 2 +-
 .../apache/ivy/core/cache/EasyAntRepositoryCacheManager.java   | 2 +-
 src/test/java/org/apache/easyant/core/EasyAntBaseTest.java     | 4 ++--
 13 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/core/EasyAntEngine.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/EasyAntEngine.java b/src/main/java/org/apache/easyant/core/EasyAntEngine.java
index b1f0093..8ab70fc 100755
--- a/src/main/java/org/apache/easyant/core/EasyAntEngine.java
+++ b/src/main/java/org/apache/easyant/core/EasyAntEngine.java
@@ -281,7 +281,7 @@ public class EasyAntEngine {
      *                if a specified InputHandler implementation could not be loaded.
      */
     protected void addInputHandler(Project project) {
-        InputHandler handler = null;
+        InputHandler handler;
 
         if (configuration.getInputHandlerClassname() == null) {
             handler = new DefaultInputHandler();
@@ -299,7 +299,7 @@ public class EasyAntEngine {
      * @return the logger instance for this build.
      */
     protected BuildLogger createLogger() {
-        BuildLogger logger = null;
+        BuildLogger logger;
         if (configuration.getLoggerClassname() != null) {
             try {
                 logger = (BuildLogger) ClasspathUtils.newInstance(configuration.getLoggerClassname(),
@@ -594,7 +594,7 @@ public class EasyAntEngine {
             InputStream savedIn = System.in;
 
             // use a system manager that prevents from System.exit()
-            SecurityManager oldsm = null;
+            SecurityManager oldsm;
             oldsm = System.getSecurityManager();
 
             // SecurityManager can not be installed here for backwards

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/core/EasyAntMain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/EasyAntMain.java b/src/main/java/org/apache/easyant/core/EasyAntMain.java
index e98a94f..1f2b8aa 100755
--- a/src/main/java/org/apache/easyant/core/EasyAntMain.java
+++ b/src/main/java/org/apache/easyant/core/EasyAntMain.java
@@ -140,7 +140,7 @@ public class EasyAntMain implements AntMain {
         easyAntConfiguration.setCoreLoader(coreLoader);
         configureOptions();
         CommandLineParser parser = new GnuParser();
-        CommandLine line = null;
+        CommandLine line;
         try {
             line = parser.parse(options, args);
             processArgs(line);
@@ -234,7 +234,7 @@ public class EasyAntMain implements AntMain {
      * @since Ant 1.6
      */
     private void processArgs(CommandLine line) {
-        String searchForThis = null;
+        String searchForThis;
         PrintStream logTo = null;
 
         if (line.hasOption("help")) {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java
b/src/main/java/org/apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java
index 51c1534..881f704 100644
--- a/src/main/java/org/apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java
+++ b/src/main/java/org/apache/easyant/core/ant/helper/ModuleIvyProjectHelper.java
@@ -36,7 +36,7 @@ public class ModuleIvyProjectHelper extends ProjectHelper {
 
     @Override
     public void parse(Project project, Object source) throws BuildException {
-        File buildFile = null;
+        File buildFile;
 
         if (source instanceof File) {
             buildFile = (File) source;

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/core/ant/listerners/BuildExecutionTimer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/ant/listerners/BuildExecutionTimer.java
b/src/main/java/org/apache/easyant/core/ant/listerners/BuildExecutionTimer.java
index 8a788d0..d793101 100644
--- a/src/main/java/org/apache/easyant/core/ant/listerners/BuildExecutionTimer.java
+++ b/src/main/java/org/apache/easyant/core/ant/listerners/BuildExecutionTimer.java
@@ -170,7 +170,7 @@ public class BuildExecutionTimer implements BuildListener, SubBuildListener
{
      * @return
      */
     public String formatExecutionResults(List<ExecutionResult> results) {
-        String formattedResults = "";
+        String formattedResults;
         int constantSpaces = 10;
         int maxUnitNameLength = 0;
         int maxExecTimeLength = 0;

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
b/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
index 0c7ebcd..077cf31 100644
--- a/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
+++ b/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
@@ -635,7 +635,7 @@ public class DefaultPluginServiceImpl implements PluginService {
         }
         ModuleRevisionId mrid = ModuleRevisionId.newInstance(organisation, moduleName, revision);
 
-        ModuleRevisionId criteria = null;
+        ModuleRevisionId criteria;
 
         if ((revision == null) || settings.getVersionMatcher().isDynamic(mrid)) {
             criteria = new ModuleRevisionId(new ModuleId(organisation, moduleName), branch,
"*");

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/AbstractImport.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/AbstractImport.java b/src/main/java/org/apache/easyant/tasks/AbstractImport.java
index 344c8b1..91c8996 100644
--- a/src/main/java/org/apache/easyant/tasks/AbstractImport.java
+++ b/src/main/java/org/apache/easyant/tasks/AbstractImport.java
@@ -92,7 +92,7 @@ public abstract class AbstractImport extends AbstractEasyAntTask {
     }
 
     public boolean shouldBeAddedToClasspath(ArtifactDownloadReport artifact) {
-        String[] types = null;
+        String[] types;
         if (getProject().getProperty(EasyAntMagicNames.IMPORT_CLASSPATH_TYPES) != null) {
             types = getProject().getProperty(EasyAntMagicNames.IMPORT_CLASSPATH_TYPES).split(",");
         } else {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/GoOffline.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/GoOffline.java b/src/main/java/org/apache/easyant/tasks/GoOffline.java
index ca0af8b..21e0a5d 100644
--- a/src/main/java/org/apache/easyant/tasks/GoOffline.java
+++ b/src/main/java/org/apache/easyant/tasks/GoOffline.java
@@ -64,7 +64,7 @@ public class GoOffline extends AbstractEasyAntTask {
 
         PluginService pluginService = (PluginService) getProject().getReference(
                 EasyAntMagicNames.PLUGIN_SERVICE_INSTANCE);
-        EasyAntReport easyAntReport = null;
+        EasyAntReport easyAntReport;
         try {
             easyAntReport = pluginService.generateEasyAntReport(moduleIvy);
             installBuildTypeAndPlugins(easyAntReport);

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/Import.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/Import.java b/src/main/java/org/apache/easyant/tasks/Import.java
index 2a3e5b7..1d16f60 100644
--- a/src/main/java/org/apache/easyant/tasks/Import.java
+++ b/src/main/java/org/apache/easyant/tasks/Import.java
@@ -70,7 +70,7 @@ public class Import extends AbstractImport implements DynamicAttribute {
     private List<IvyConflict> conflicts = new ArrayList<IvyConflict>();
 
     public void execute() {
-        ModuleRevisionId moduleRevisionId = null;
+        ModuleRevisionId moduleRevisionId;
         if (mrid != null) {
             moduleRevisionId = ModuleRevisionId.parse(mrid);
         } else if (organisation != null && module != null && revision !=
null) {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/ImportDeferred.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/ImportDeferred.java b/src/main/java/org/apache/easyant/tasks/ImportDeferred.java
index c48b9b8..2637a22 100644
--- a/src/main/java/org/apache/easyant/tasks/ImportDeferred.java
+++ b/src/main/java/org/apache/easyant/tasks/ImportDeferred.java
@@ -52,7 +52,7 @@ public class ImportDeferred extends AbstractImport implements DynamicAttribute
{
     private String organisation;
 
     public void execute() {
-        ModuleId moduleId = null;
+        ModuleId moduleId;
         if (organisation != null && module != null) {
             moduleId = ModuleId.newInstance(organisation, module);
         } else {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/LoadModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/LoadModule.java b/src/main/java/org/apache/easyant/tasks/LoadModule.java
index 3e37b56..95eee5d 100644
--- a/src/main/java/org/apache/easyant/tasks/LoadModule.java
+++ b/src/main/java/org/apache/easyant/tasks/LoadModule.java
@@ -451,8 +451,8 @@ public class LoadModule extends AbstractEasyAntTask {
     }
 
     protected EasyAntModuleDescriptorParser getEasyAntModuleDescriptorParser(File file) throws
BuildException {
-        ModuleDescriptorParser mdp = null;
-        EasyAntModuleDescriptorParser parser = null;
+        ModuleDescriptorParser mdp;
+        EasyAntModuleDescriptorParser parser;
         try {
             mdp = ModuleDescriptorParserRegistry.getInstance().getParser(new URLResource(file.toURI().toURL()));
         } catch (MalformedURLException e) {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/easyant/tasks/SearchModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/tasks/SearchModule.java b/src/main/java/org/apache/easyant/tasks/SearchModule.java
index d73679b..ea1e34a 100644
--- a/src/main/java/org/apache/easyant/tasks/SearchModule.java
+++ b/src/main/java/org/apache/easyant/tasks/SearchModule.java
@@ -120,7 +120,7 @@ public class SearchModule extends IvyTask {
     }
 
     protected String getInput(String message, String defaultvalue, List<String> choices)
{
-        InputRequest request = null;
+        InputRequest request;
         request = new MultipleChoiceInputRequest(message, new Vector(choices));
         request.setDefaultValue(defaultvalue);
 

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/main/java/org/apache/ivy/core/cache/EasyAntRepositoryCacheManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/ivy/core/cache/EasyAntRepositoryCacheManager.java b/src/main/java/org/apache/ivy/core/cache/EasyAntRepositoryCacheManager.java
index da1ee9a..3b6f1e5 100644
--- a/src/main/java/org/apache/ivy/core/cache/EasyAntRepositoryCacheManager.java
+++ b/src/main/java/org/apache/ivy/core/cache/EasyAntRepositoryCacheManager.java
@@ -713,7 +713,7 @@ public class EasyAntRepositoryCacheManager implements RepositoryCacheManager,
Iv
             return null;
         }
         try {
-            String resolvedRevision = null;
+            String resolvedRevision;
             if (options.isForce()) {
                 Message.verbose("refresh mode: no check for cached resolved revision for
" + mrid);
                 return null;

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/eb500512/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java b/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
index 6fa7936..2545077 100755
--- a/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
+++ b/src/test/java/org/apache/easyant/core/EasyAntBaseTest.java
@@ -322,7 +322,7 @@ public abstract class EasyAntBaseTest {
      * @throws BuildException
      */
     public void configureProject(URL url) throws BuildException {
-        File f = null;
+        File f;
         try {
             f = new File(url.toURI());
         } catch (URISyntaxException e) {
@@ -342,7 +342,7 @@ public abstract class EasyAntBaseTest {
      * @throws BuildException
      */
     public void configureProject(URL url, int logLevel) throws BuildException {
-        File f = null;
+        File f;
         try {
             f = new File(url.toURI());
         } catch (URISyntaxException e) {


Mime
View raw message