Commit 618ff639 authored by Riegel's avatar Riegel
Browse files

Converted for each loop to explicit implementation. Ref #69

parent 5ebd7188
...@@ -52,9 +52,7 @@ public class ArgumentParser { ...@@ -52,9 +52,7 @@ public class ArgumentParser {
HashMap<String, List<String>> params = new HashMap<>(); HashMap<String, List<String>> params = new HashMap<>();
List<String> options = null; List<String> options = null;
for (int i = 0; i < args.length; i++) { for (final String a : args) {
final String a = args[i];
if (a.charAt(0) == '-') { if (a.charAt(0) == '-') {
if (a.length() < 2) { if (a.length() < 2) {
ErrorHandler.printHelpAndTerminate("Error while parsing argument " + a); ErrorHandler.printHelpAndTerminate("Error while parsing argument " + a);
......
...@@ -30,13 +30,13 @@ public class Table { ...@@ -30,13 +30,13 @@ public class Table {
private static final String TABLE_HEADER_COLOR = "#58ACFA"; private static final String TABLE_HEADER_COLOR = "#58ACFA";
private Element tableBlock; private final Element tableBlock;
private Element tableHeader; private final Element tableHeader;
private Element tableBody; private final Element tableBody;
private Element tableElement; private final Element tableElement;
private int columns; private final int columns;
public Table(int columns) { public Table(int columns) {
this.columns = columns; this.columns = columns;
...@@ -101,10 +101,10 @@ public class Table { ...@@ -101,10 +101,10 @@ public class Table {
private Element createTableRow(String... content) { private Element createTableRow(String... content) {
Element tableRow = new Element("table-row", PdfReport.FO_NS); Element tableRow = new Element("table-row", PdfReport.FO_NS);
for (int i = 0; i < content.length; i++) { for (String s : content) {
Element tableCell = new Element("table-cell", PdfReport.FO_NS); Element tableCell = new Element("table-cell", PdfReport.FO_NS);
tableRow.addContent(tableCell); tableRow.addContent(tableCell);
tableCell.addContent(PdfReport.createTextElement(content[i])); tableCell.addContent(PdfReport.createTextElement(s));
tableCell.setAttribute("padding", "3pt 3pt 3pt 3pt"); tableCell.setAttribute("padding", "3pt 3pt 3pt 3pt");
PdfReport.applySolidBorder(tableCell); PdfReport.applySolidBorder(tableCell);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment