make things final and fix copy-paste errors

This commit is contained in:
Xavier Léauté 2013-11-07 15:25:47 -08:00
parent 04e285638e
commit 66181be1c6
1 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ public class JavaScriptPostAggregator implements PostAggregator
private static Function compile(String function) {
final ContextFactory contextFactory = ContextFactory.getGlobal();
Context context = contextFactory.enterContext();
final Context context = contextFactory.enterContext();
context.setOptimizationLevel(9);
final ScriptableObject scope = context.initStandardObjects();
@ -90,9 +90,9 @@ public class JavaScriptPostAggregator implements PostAggregator
@JsonProperty("function") final String function
)
{
Preconditions.checkNotNull(name, "Must have a valid, non-null aggregator name");
Preconditions.checkNotNull(name, "Must have a valid, non-null post-aggregator name");
Preconditions.checkNotNull(fieldNames, "Must have a valid, non-null fieldNames");
Preconditions.checkNotNull(function, "Must have a valid, non-null fnAggregate");
Preconditions.checkNotNull(function, "Must have a valid, non-null function");
this.name = name;
this.fieldNames = fieldNames;
@ -116,7 +116,7 @@ public class JavaScriptPostAggregator implements PostAggregator
@Override
public Object compute(Map<String, Object> combinedAggregators)
{
Object[] args = new Object[fieldNames.size()];
final Object[] args = new Object[fieldNames.size()];
int i = 0;
for(String field : fieldNames) {
args[i++] = combinedAggregators.get(field);