Permalink
Browse files

Mixed polishing along with recent changes

  • Loading branch information...
1 parent 9c6df76 commit 14e5a02870f9ef90df6171c63ee23d0db5c29809 @jhoeller jhoeller committed Feb 14, 2014
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,13 +29,13 @@
/**
* Return the cache associated with the given name.
* @param name cache identifier (must not be {@code null})
- * @return associated cache, or {@code null} if none is found
+ * @return the associated cache, or {@code null} if none is found
*/
Cache getCache(String name);
/**
* Return a collection of the caches known by this cache manager.
- * @return names of caches known by the cache manager.
+ * @return names of caches known by the cache manager
*/
Collection<String> getCacheNames();
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,9 +30,10 @@
public class CompoundExpression extends SpelNodeImpl {
public CompoundExpression(int pos,SpelNodeImpl... expressionComponents) {
- super(pos,expressionComponents);
- if (expressionComponents.length<2) {
- throw new IllegalStateException("Dont build compound expression less than one entry: "+expressionComponents.length);
+ super(pos, expressionComponents);
+ if (expressionComponents.length < 2) {
+ throw new IllegalStateException("Do not build compound expression less than one entry: " +
+ expressionComponents.length);
}
}
@@ -42,11 +43,9 @@ protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
if (getChildCount() == 1) {
return this.children[0].getValueRef(state);
}
- TypedValue result = null;
- SpelNodeImpl nextNode = null;
+ SpelNodeImpl nextNode = this.children[0];
try {
- nextNode = this.children[0];
- result = nextNode.getValueInternal(state);
+ TypedValue result = nextNode.getValueInternal(state);
int cc = getChildCount();
for (int i = 1; i < cc - 1; i++) {
try {
@@ -75,8 +74,8 @@ protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
}
/**
- * Evaluates a compound expression. This involves evaluating each piece in turn and the return value from each piece
- * is the active context object for the subsequent piece.
+ * Evaluates a compound expression. This involves evaluating each piece in turn and the
+ * return value from each piece is the active context object for the subsequent piece.
* @param state the state in which the expression is being evaluated
* @return the final value from the last piece of the compound expression
*/
Oops, something went wrong.

0 comments on commit 14e5a02

Please sign in to comment.