Skip to content

Commit 14e5a02

Browse files
committed
Mixed polishing along with recent changes
1 parent 9c6df76 commit 14e5a02

File tree

9 files changed

+285
-291
lines changed

9 files changed

+285
-291
lines changed

spring-context/src/main/java/org/springframework/cache/CacheManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2011 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,13 +29,13 @@ public interface CacheManager {
2929
/**
3030
* Return the cache associated with the given name.
3131
* @param name cache identifier (must not be {@code null})
32-
* @return associated cache, or {@code null} if none is found
32+
* @return the associated cache, or {@code null} if none is found
3333
*/
3434
Cache getCache(String name);
3535

3636
/**
3737
* Return a collection of the caches known by this cache manager.
38-
* @return names of caches known by the cache manager.
38+
* @return names of caches known by the cache manager
3939
*/
4040
Collection<String> getCacheNames();
4141

spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,9 +30,10 @@
3030
public class CompoundExpression extends SpelNodeImpl {
3131

3232
public CompoundExpression(int pos,SpelNodeImpl... expressionComponents) {
33-
super(pos,expressionComponents);
34-
if (expressionComponents.length<2) {
35-
throw new IllegalStateException("Dont build compound expression less than one entry: "+expressionComponents.length);
33+
super(pos, expressionComponents);
34+
if (expressionComponents.length < 2) {
35+
throw new IllegalStateException("Do not build compound expression less than one entry: " +
36+
expressionComponents.length);
3637
}
3738
}
3839

@@ -42,11 +43,9 @@ protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
4243
if (getChildCount() == 1) {
4344
return this.children[0].getValueRef(state);
4445
}
45-
TypedValue result = null;
46-
SpelNodeImpl nextNode = null;
46+
SpelNodeImpl nextNode = this.children[0];
4747
try {
48-
nextNode = this.children[0];
49-
result = nextNode.getValueInternal(state);
48+
TypedValue result = nextNode.getValueInternal(state);
5049
int cc = getChildCount();
5150
for (int i = 1; i < cc - 1; i++) {
5251
try {
@@ -75,8 +74,8 @@ protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
7574
}
7675

7776
/**
78-
* Evaluates a compound expression. This involves evaluating each piece in turn and the return value from each piece
79-
* is the active context object for the subsequent piece.
77+
* Evaluates a compound expression. This involves evaluating each piece in turn and the
78+
* return value from each piece is the active context object for the subsequent piece.
8079
* @param state the state in which the expression is being evaluated
8180
* @return the final value from the last piece of the compound expression
8281
*/

0 commit comments

Comments
 (0)