Polish formatting
Minor formatting polish across that codebase. Primarily fixing whitespace issues.
This commit is contained in:
@@ -43,4 +43,4 @@ public interface MethodFilter {
|
||||
*/
|
||||
List<Method> filter(List<Method> methods);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class CompoundExpression extends SpelNodeImpl {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ValueRef getValueRef(ExpressionState state) throws EvaluationException {
|
||||
if (getChildCount()==1) {
|
||||
|
||||
@@ -70,7 +70,7 @@ public class Projection extends SpelNodeImpl {
|
||||
if (operand instanceof Map) {
|
||||
Map<?, ?> mapData = (Map<?, ?>) operand;
|
||||
List<Object> result = new ArrayList<Object>();
|
||||
for (Map.Entry<?,?> entry : mapData.entrySet()) {
|
||||
for (Map.Entry<?, ?> entry : mapData.entrySet()) {
|
||||
try {
|
||||
state.pushActiveContextObject(new TypedValue(entry));
|
||||
result.add(this.children[0].getValueInternal(state).getValue());
|
||||
|
||||
@@ -73,9 +73,9 @@ public class Selection extends SpelNodeImpl {
|
||||
if (operand instanceof Map) {
|
||||
Map<?, ?> mapdata = (Map<?, ?>) operand;
|
||||
// TODO don't lose generic info for the new map
|
||||
Map<Object,Object> result = new HashMap<Object,Object>();
|
||||
Map<Object, Object> result = new HashMap<Object, Object>();
|
||||
Object lastKey = null;
|
||||
for (Map.Entry<?,?> entry : mapdata.entrySet()) {
|
||||
for (Map.Entry<?, ?> entry : mapdata.entrySet()) {
|
||||
try {
|
||||
TypedValue kvpair = new TypedValue(entry);
|
||||
state.pushActiveContextObject(kvpair);
|
||||
@@ -101,7 +101,7 @@ public class Selection extends SpelNodeImpl {
|
||||
return new ValueRef.TypedValueHolderValueRef(new TypedValue(null),this);
|
||||
}
|
||||
if (variant == LAST) {
|
||||
Map<Object,Object> resultMap = new HashMap<Object,Object>();
|
||||
Map<Object, Object> resultMap = new HashMap<Object, Object>();
|
||||
Object lastValue = result.get(lastKey);
|
||||
resultMap.put(lastKey,lastValue);
|
||||
return new ValueRef.TypedValueHolderValueRef(new TypedValue(resultMap),this);
|
||||
|
||||
@@ -149,5 +149,4 @@ public abstract class SpelNodeImpl implements SpelNode {
|
||||
protected ValueRef getValueRef(ExpressionState state) throws EvaluationException {
|
||||
throw new SpelEvaluationException(pos,SpelMessage.NOT_ASSIGNABLE,toStringAST());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,4 +84,4 @@ class Token {
|
||||
public Token asBetweenToken() {
|
||||
return new Token(TokenKind.BETWEEN,startpos,endpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,4 +56,4 @@ enum TokenKind {
|
||||
public int getLength() {
|
||||
return tokenChars.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user