Skip to content

Commit

Permalink
Mixed polishing along with recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Feb 14, 2014
1 parent 9c6df76 commit 14e5a02
Show file tree
Hide file tree
Showing 9 changed files with 285 additions and 291 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -29,13 +29,13 @@ public interface CacheManager {
/**
* 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();

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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
*/
Expand Down
Loading

0 comments on commit 14e5a02

Please sign in to comment.