summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/pablotron/luigi/Parser.java14
-rw-r--r--java/pablotron/luigi/Template.java4
2 files changed, 9 insertions, 9 deletions
diff --git a/java/pablotron/luigi/Parser.java b/java/pablotron/luigi/Parser.java
index 207df86..0e415c4 100644
--- a/java/pablotron/luigi/Parser.java
+++ b/java/pablotron/luigi/Parser.java
@@ -63,16 +63,16 @@ public final class Parser {
);
public static Action[] parse_template(
- String template
+ final String template
) throws LuigiError {
- ArrayList<Action> r = new ArrayList<Action>();
+ final ArrayList<Action> r = new ArrayList<Action>();
// match on text
final Matcher m = RE_ACTION.matcher(template);
while (m.find()) {
// String key = m.group("key");
- String key = m.group(1);
+ final String key = m.group(1);
if (key != null && key.length() > 0) {
// r.add(new FilterAction(key, parse_filters(m.group("filters"))));
@@ -90,9 +90,9 @@ public final class Parser {
private static final String[] NO_ARGS = {};
public static FilterReference[] parse_filters(
- String filters_str
+ final String filters_str
) throws LuigiError {
- ArrayList<FilterReference> r = new ArrayList<FilterReference>();
+ final ArrayList<FilterReference> r = new ArrayList<FilterReference>();
// split string into individual filters and handle each one
for (String f: RE_DELIM_FILTERS.split(filters_str)) {
@@ -102,12 +102,12 @@ public final class Parser {
continue;
// match on filter and check for error
- Matcher m = RE_FILTER.matcher(f);
+ final Matcher m = RE_FILTER.matcher(f);
if (!m.find())
throw new LuigiError("invalid filter: " + f);
// get arguments string
- String args = m.group(2).trim();
+ final String args = m.group(2).trim();
// append new filter reference to result
r.add(new FilterReference(
diff --git a/java/pablotron/luigi/Template.java b/java/pablotron/luigi/Template.java
index 2bf0bb7..8ab1d77 100644
--- a/java/pablotron/luigi/Template.java
+++ b/java/pablotron/luigi/Template.java
@@ -26,8 +26,8 @@ public final class Template {
this(template, Filter.FILTERS);
}
- public String run(Map<String, String> args) throws LuigiError {
- StringBuilder r = new StringBuilder();
+ public String run(final Map<String, String> args) throws LuigiError {
+ final StringBuilder r = new StringBuilder();
for (Action a: this.actions)
r.append(a.run(this.filters, args));