Tidying.
This commit is contained in:
@@ -41,11 +41,8 @@ public abstract class BasicCollector implements Mustache.Collector
|
|||||||
|
|
||||||
protected static final Mustache.VariableFetcher MAP_FETCHER = new Mustache.VariableFetcher() {
|
protected static final Mustache.VariableFetcher MAP_FETCHER = new Mustache.VariableFetcher() {
|
||||||
public Object get (Object ctx, String name) throws Exception {
|
public Object get (Object ctx, String name) throws Exception {
|
||||||
if (((Map<?,?>)ctx).containsKey(name)) {
|
Map<?,?> map = (Map<?,?>)ctx;
|
||||||
return ((Map<?,?>)ctx).get(name);
|
return map.containsKey(name) ? map.get(name) : Template.NO_FETCHER_FOUND;
|
||||||
} else {
|
|
||||||
return Template.NO_FETCHER_FOUND;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user