From 67e810cce303cc7d3c10ca05b05812d2b04104bb Mon Sep 17 00:00:00 2001 From: "pabs@pablotron.org" Date: Thu, 18 Dec 2014 16:18:26 -0500 Subject: add missing finals --- java/pablotron/luigi/Parser.java | 14 +++++++------- java/pablotron/luigi/Template.java | 4 ++-- 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 r = new ArrayList(); + final ArrayList r = new ArrayList(); // 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 r = new ArrayList(); + final ArrayList r = new ArrayList(); // 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 args) throws LuigiError { - StringBuilder r = new StringBuilder(); + public String run(final Map args) throws LuigiError { + final StringBuilder r = new StringBuilder(); for (Action a: this.actions) r.append(a.run(this.filters, args)); -- cgit v1.2.3