Some cleanups.

Change-Id: I09c23c5867545e7b27bd1629e71f47e86e37ab18
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/Converter.java b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/Converter.java
index a17a827..9fba7d7 100644
--- a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/Converter.java
+++ b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/Converter.java
@@ -3,7 +3,7 @@
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors: IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -23,9 +23,9 @@
 import org.eclipse.releng.build.tools.convert.dom.IDOMConverter;
 import org.eclipse.releng.build.tools.convert.dom.LogDocumentNode;
 import org.eclipse.releng.build.tools.convert.dom.ProblemNode;
-import org.eclipse.releng.build.tools.convert.dom.SeverityType;
 import org.eclipse.releng.build.tools.convert.dom.ProblemSummaryNode;
 import org.eclipse.releng.build.tools.convert.dom.ProblemsNode;
+import org.eclipse.releng.build.tools.convert.dom.SeverityType;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -64,8 +64,7 @@
 
     private static void collectAllFiles(final File root, final ArrayList<File> collector, final FileFilter fileFilter) {
         final File[] files = root.listFiles(fileFilter);
-        for (int i = 0; i < files.length; i++) {
-            final File currentFile = files[i];
+        for (final File currentFile : files) {
             if (currentFile.isDirectory()) {
                 collectAllFiles(currentFile, collector, fileFilter);
             } else {
@@ -94,7 +93,7 @@
         }
     }
 
-    public static void run(final String[] args) throws ParserConfigurationException {
+	public static void run(final String... args) throws ParserConfigurationException {
         final Converter converter = new Converter();
         converter.configure(args);
         converter.parse2();
@@ -223,15 +222,14 @@
                 throw new IllegalArgumentException(inputSourceOption + " must be a directory in recursive mode");//$NON-NLS-1$
             }
             final File[] xmlFiles = getAllFiles(sourceDir, XML_FILTER);
-            for (int i = 0, max = xmlFiles.length; i < max; i++) {
-                final String inputFileName = xmlFiles[i].getAbsolutePath();
+            for (File xmlFile : xmlFiles) {
+                final String inputFileName = xmlFile.getAbsolutePath();
                 final InputSource inputSource = new InputSource(inputFileName);
                 final String outputFileName = extractNameFrom(inputFileName);
                 options.put(INPUT_SOURCE, inputFileName);
                 options.put(OUTPUT_FILE_NAME, outputFileName);
                 try {
                     builder.setErrorHandler(new DefaultHandler() {
-
                         @Override
                         public void error(final SAXParseException e) throws SAXException {
                             reportError(inputFileName, e);
@@ -328,7 +326,7 @@
                     problem.severityType = SeverityType.ERROR;
                     node.addError(problem);
                     break;
-                  case "INFO": 
+                  case "INFO":
                     problem.severityType = SeverityType.INFO;
                     node.addInfo(problem);
                     break;
@@ -344,7 +342,7 @@
                       node.addOtherWarning(problem);
                     }
                     break;
-                }  
+                }
                 problem.charStart = Integer.parseInt(problemNodeMap.getNamedItem("charStart").getNodeValue());//$NON-NLS-1$
                 problem.charEnd = Integer.parseInt(problemNodeMap.getNamedItem("charEnd").getNodeValue());//$NON-NLS-1$
                 problem.line = Integer.parseInt(problemNodeMap.getNamedItem("line").getNodeValue());//$NON-NLS-1$
diff --git a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/LogConverterTask.java b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/LogConverterTask.java
index 252af48..6c7d7ca 100644
--- a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/LogConverterTask.java
+++ b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/ant/LogConverterTask.java
@@ -3,7 +3,7 @@
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors: IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -15,12 +15,12 @@
 /**
  * This ant task is used to convert all xml files inside the given
  * <code>logDirectory</code> and into html or txt files.
- * 
+ *
  * <p>
  * The resulting files are written in the same directory than the corresponding
  * xml file.
  * </p>
- * 
+ *
  * <p>
  * This is not intended to be subclassed by users.
  * </p>
@@ -38,12 +38,12 @@
         }
         try {
             if (isValidation()) {
-                Converter.run(new String[] { "-v", "-r", "-i", input }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                Converter.run("-v", "-r", "-i", input); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             } else {
-                Converter.run(new String[] { "-r", "-i", input }); //$NON-NLS-1$ //$NON-NLS-2$
+                Converter.run("-r", "-i", input); //$NON-NLS-1$ //$NON-NLS-2$
             }
         }
-        catch (final Exception e) {
+		catch (final Exception e) {
             throw new BuildException("Exception during conversion", e);//$NON-NLS-1$
         }
     }