Browse Source

Remove trailing whitespace in source code

pull/753/merge
Sam Brannen 10 years ago
parent
commit
d90cee78ef
  1. 4
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java
  2. 4
      spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java
  3. 2
      spring-context/src/test/java/org/springframework/context/annotation/AutoProxyLazyInitTests.java
  4. 4
      spring-core/src/main/java/org/springframework/util/UpdateMessageDigestInputStream.java
  5. 6
      spring-core/src/test/java/org/springframework/util/concurrent/SettableListenableFutureTests.java
  6. 34
      spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java
  7. 2
      spring-expression/src/main/java/org/springframework/expression/spel/CompilablePropertyAccessor.java
  8. 4
      spring-expression/src/main/java/org/springframework/expression/spel/CompiledExpression.java
  9. 2
      spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java
  10. 4
      spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java
  11. 4
      spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java
  12. 6
      spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java
  13. 2
      spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java
  14. 12
      spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java
  15. 4
      spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java
  16. 2
      spring-expression/src/test/java/org/springframework/expression/spel/EvaluationTests.java
  17. 2
      spring-expression/src/test/java/org/springframework/expression/spel/MapTests.java
  18. 10
      spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java
  19. 902
      spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java
  20. 20
      spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationPerformanceTests.java
  21. 2
      spring-expression/src/test/java/org/springframework/expression/spel/testdata/PersonInOtherPackage.java
  22. 8
      spring-web/src/test/java/org/springframework/protobuf/Msg.java
  23. 2
      spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java

4
spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java

@ -72,7 +72,7 @@ public class LookupAnnotationTests { @@ -72,7 +72,7 @@ public class LookupAnnotationTests {
assertEquals(TestBean.class, expected.getClass());
assertEquals("haha", expected.getName());
}
@Test
public void testWithTwoConstructorArg() {
AbstractBean bean = (AbstractBean) beanFactory.getBean("abstractBean");
@ -82,7 +82,7 @@ public class LookupAnnotationTests { @@ -82,7 +82,7 @@ public class LookupAnnotationTests {
assertEquals("haha", expected.getName());
assertEquals(72, expected.getAge());
}
@Test
public void testWithThreeArgsShouldFail() {
AbstractBean bean = (AbstractBean) beanFactory.getBean("abstractBean");

4
spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java

@ -67,7 +67,7 @@ public class LookupMethodTests { @@ -67,7 +67,7 @@ public class LookupMethodTests {
assertEquals(TestBean.class, expected.getClass());
assertEquals("haha", expected.getName());
}
@Test
public void testWithTwoConstructorArg() {
AbstractBean bean = (AbstractBean) beanFactory.getBean("abstractBean");
@ -77,7 +77,7 @@ public class LookupMethodTests { @@ -77,7 +77,7 @@ public class LookupMethodTests {
assertEquals("haha", expected.getName());
assertEquals(72, expected.getAge());
}
@Test
public void testWithThreeArgsShouldFail() {
AbstractBean bean = (AbstractBean) beanFactory.getBean("abstractBean");

2
spring-context/src/test/java/org/springframework/context/annotation/AutoProxyLazyInitTests.java

@ -41,7 +41,7 @@ public class AutoProxyLazyInitTests { @@ -41,7 +41,7 @@ public class AutoProxyLazyInitTests {
ApplicationContext ctx = new AnnotationConfigApplicationContext(ConfigWithStatic.class);
MyBean bean = ctx.getBean("myBean", MyBean.class);
assertFalse(MyBeanImpl.initialized);
bean.doIt();
assertTrue(MyBeanImpl.initialized);

4
spring-core/src/main/java/org/springframework/util/UpdateMessageDigestInputStream.java

@ -28,7 +28,7 @@ import java.security.MessageDigest; @@ -28,7 +28,7 @@ import java.security.MessageDigest;
* @since 4.2
*/
abstract class UpdateMessageDigestInputStream extends InputStream {
/**
* Update the message digest with the rest of the bytes in this stream.
* <p>Using this method is more optimized since it avoids creating new
@ -42,7 +42,7 @@ abstract class UpdateMessageDigestInputStream extends InputStream { @@ -42,7 +42,7 @@ abstract class UpdateMessageDigestInputStream extends InputStream {
messageDigest.update((byte) data);
}
}
/**
* Update the message digest with the next len bytes in this stream.
* <p>Using this method is more optimized since it avoids creating new

6
spring-core/src/test/java/org/springframework/util/concurrent/SettableListenableFutureTests.java

@ -316,16 +316,16 @@ public class SettableListenableFutureTests { @@ -316,16 +316,16 @@ public class SettableListenableFutureTests {
settableListenableFuture.setException(new RuntimeException());
verifyNoMoreInteractions(callback);
}
private static class InterruptableSettableListenableFuture extends SettableListenableFuture<String> {
private boolean interrupted = false;
@Override
protected void interruptTask() {
interrupted = true;
}
boolean calledInterruptTask() {
return interrupted;
}

34
spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java

@ -56,7 +56,7 @@ public class CodeFlow implements Opcodes { @@ -56,7 +56,7 @@ public class CodeFlow implements Opcodes {
* will be called after the main evaluation function has finished being generated.
*/
private List<FieldAdder> fieldAdders = null;
/**
* As SpEL ast nodes are called to generate code for the main evaluation method
* they can register to add code to a static initializer in the class. Any
@ -64,19 +64,19 @@ public class CodeFlow implements Opcodes { @@ -64,19 +64,19 @@ public class CodeFlow implements Opcodes {
* has finished being generated.
*/
private List<ClinitAdder> clinitAdders = null;
/**
* Name of the class being generated. Typically used when generating code
* that accesses freshly generated fields on the generated type.
*/
private String clazzName;
/**
* When code generation requires holding a value in a class level field, this
* is used to track the next available field id (used as a name suffix).
*/
private int nextFieldId = 1;
/**
* When code generation requires an intermediate variable within a method,
* this method records the next available variable (variable 0 is 'this').
@ -222,7 +222,7 @@ public class CodeFlow implements Opcodes { @@ -222,7 +222,7 @@ public class CodeFlow implements Opcodes {
mv.visitTypeInsn(CHECKCAST, "java/lang/Number");
}
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Number", "doubleValue", "()D", false);
break;
break;
case 'F':
if (stackDescriptor.equals("Ljava/lang/Object")) {
mv.visitTypeInsn(CHECKCAST, "java/lang/Number");
@ -246,7 +246,7 @@ public class CodeFlow implements Opcodes { @@ -246,7 +246,7 @@ public class CodeFlow implements Opcodes {
throw new IllegalArgumentException("Unboxing should not be attempted for descriptor '" + targetDescriptor + "'");
}
}
/**
* Insert any necessary numeric conversion bytecodes based upon what is on the stack and the desired target type.
* @param mv the method visitor into which instructions should be placed
@ -327,7 +327,7 @@ public class CodeFlow implements Opcodes { @@ -327,7 +327,7 @@ public class CodeFlow implements Opcodes {
}
}
/**
* Create the JVM signature descriptor for a method. This consists of the descriptors
* for the method parameters surrounded with parentheses, followed by the
@ -777,7 +777,7 @@ public class CodeFlow implements Opcodes { @@ -777,7 +777,7 @@ public class CodeFlow implements Opcodes {
}
return descriptors;
}
/**
* Called after the main expression evaluation method has been generated, this
* method will callback any registered FieldAdders or ClinitAdders to add any
@ -815,7 +815,7 @@ public class CodeFlow implements Opcodes { @@ -815,7 +815,7 @@ public class CodeFlow implements Opcodes {
}
/**
* Register a ClinitAdder which will add code to the static
* Register a ClinitAdder which will add code to the static
* initializer in the generated class to support the code
* produced by an ast nodes primary generateCode() method.
*/
@ -837,11 +837,11 @@ public class CodeFlow implements Opcodes { @@ -837,11 +837,11 @@ public class CodeFlow implements Opcodes {
public String getClassname() {
return clazzName;
}
public interface FieldAdder {
public void generateField(ClassWriter cw, CodeFlow codeflow);
}
public interface ClinitAdder {
public void generateCode(MethodVisitor mv, CodeFlow codeflow);
}
@ -863,11 +863,11 @@ public class CodeFlow implements Opcodes { @@ -863,11 +863,11 @@ public class CodeFlow implements Opcodes {
}
else {
mv.visitLdcInsn(value);
}
}
}
/**
* Produce appropriate bytecode to store a stack item in an array. The
* Produce appropriate bytecode to store a stack item in an array. The
* instruction to use varies depending on whether the type
* is a primitive or reference type.
* @param mv where to insert the bytecode
@ -901,7 +901,7 @@ public class CodeFlow implements Opcodes { @@ -901,7 +901,7 @@ public class CodeFlow implements Opcodes {
public static int arrayCodeFor(String arraytype) {
switch (arraytype.charAt(0)) {
case 'I': return T_INT;
case 'J': return T_LONG;
case 'J': return T_LONG;
case 'F': return T_FLOAT;
case 'D': return T_DOUBLE;
case 'B': return T_BYTE;
@ -925,9 +925,9 @@ public class CodeFlow implements Opcodes { @@ -925,9 +925,9 @@ public class CodeFlow implements Opcodes {
}
return false;
}
/**
* Produce the correct bytecode to build an array. The opcode to use and the
* Produce the correct bytecode to build an array. The opcode to use and the
* signature to pass along with the opcode can vary depending on the signature
* of the array type.
* @param mv the methodvisitor into which code should be inserted
@ -972,5 +972,5 @@ public class CodeFlow implements Opcodes { @@ -972,5 +972,5 @@ public class CodeFlow implements Opcodes {
}
}
}

2
spring-expression/src/main/java/org/springframework/expression/spel/CompilablePropertyAccessor.java

@ -21,7 +21,7 @@ import org.springframework.asm.Opcodes; @@ -21,7 +21,7 @@ import org.springframework.asm.Opcodes;
import org.springframework.expression.PropertyAccessor;
/**
* A compilable property accessor is able to generate bytecode that represents
* A compilable property accessor is able to generate bytecode that represents
* the access operation, facilitating compilation to bytecode of expressions
* that use the accessor.
*

4
spring-expression/src/main/java/org/springframework/expression/spel/CompiledExpression.java

@ -23,12 +23,12 @@ import org.springframework.expression.EvaluationException; @@ -23,12 +23,12 @@ import org.springframework.expression.EvaluationException;
* Base superclass for compiled expressions. Each generated compiled expression class
* will extend this class and implement the {@link #getValue} method. It is not intended
* to be subclassed by user code.
*
*
* @author Andy Clement
* @since 4.1
*/
public abstract class CompiledExpression {
/**
* Subclasses of CompiledExpression generated by SpelCompiler will provide an
* implementation of this method.

2
spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java

@ -250,7 +250,7 @@ public enum SpelMessage { @@ -250,7 +250,7 @@ public enum SpelMessage {
MISSING_SELECTION_EXPRESSION(Kind.ERROR, 1071,
"A required selection expression has not been specified"),
EXCEPTION_RUNNING_COMPILED_EXPRESSION(Kind.ERROR,1072,
"An exception occurred whilst evaluating a compiled expression");

4
spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java

@ -622,7 +622,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { @@ -622,7 +622,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser {
// '}' - end of list
// ',' - more expressions in this list
// ':' - this is a map!
if (peekToken(TokenKind.RCURLY)) { // list with one item in it
List<SpelNodeImpl> listElements = new ArrayList<SpelNodeImpl>();
listElements.add(firstExpression);
@ -638,7 +638,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { @@ -638,7 +638,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser {
while (peekToken(TokenKind.COMMA,true));
closingCurly = eatToken(TokenKind.RCURLY);
expr = new InlineList(toPos(t.startPos,closingCurly.endPos),listElements.toArray(new SpelNodeImpl[listElements.size()]));
}
else if (peekToken(TokenKind.COLON, true)) { // map!
List<SpelNodeImpl> mapElements = new ArrayList<SpelNodeImpl>();

4
spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelCompiler.java

@ -176,9 +176,9 @@ public class SpelCompiler implements Opcodes { @@ -176,9 +176,9 @@ public class SpelCompiler implements Opcodes {
mv.visitMaxs(0, 0); // not supplied due to COMPUTE_MAXS
mv.visitEnd();
cw.visitEnd();
cf.finish();
byte[] data = cw.toByteArray();
// TODO need to make this conditionally occur based on a debug flag
// dump(expressionToCompile.toStringAST(), clazzName, data);

6
spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java

@ -66,7 +66,7 @@ public class SpelExpression implements Expression { @@ -66,7 +66,7 @@ public class SpelExpression implements Expression {
// Count of many times as the expression been interpreted - can trigger compilation
// when certain limit reached
private volatile int interpretedCount = 0;
// The number of times compilation was attempted and failed - enables us to eventually
// give up trying to compile it when it just doesn't seem to be possible.
private volatile int failedAttempts = 0;
@ -448,8 +448,8 @@ public class SpelExpression implements Expression { @@ -448,8 +448,8 @@ public class SpelExpression implements Expression {
/**
* Perform expression compilation. This will only succeed once exit descriptors for all nodes have
* been determined. If the compilation fails and has failed more than 100 times the expression is
* Perform expression compilation. This will only succeed once exit descriptors for all nodes have
* been determined. If the compilation fails and has failed more than 100 times the expression is
* no longer considered suitable for compilation.
*/
public boolean compileExpression() {

2
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java

@ -239,7 +239,7 @@ public class ReflectionHelper { @@ -239,7 +239,7 @@ public class ReflectionHelper {
Integer varargsPosition = method.isVarArgs() ? method.getParameterTypes().length-1:null;
return convertArguments(converter, arguments, method, varargsPosition);
}
/**
* Takes an input set of argument values and converts them to the types specified as the
* required parameter types. The arguments are converted 'in-place' in the input array.

12
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java

@ -35,11 +35,11 @@ import org.springframework.util.ReflectionUtils; @@ -35,11 +35,11 @@ import org.springframework.util.ReflectionUtils;
public class ReflectiveMethodExecutor implements MethodExecutor {
private final Method method;
private final Integer varargsPosition;
private boolean computedPublicDeclaringClass = false;
private Class<?> publicDeclaringClass;
private boolean argumentConversionOccurred = false;
@ -58,10 +58,10 @@ public class ReflectiveMethodExecutor implements MethodExecutor { @@ -58,10 +58,10 @@ public class ReflectiveMethodExecutor implements MethodExecutor {
public Method getMethod() {
return this.method;
}
/**
* Find the first public class in the methods declaring class hierarchy that declares this method.
* Sometimes the reflective method discovery logic finds a suitable method that can easily be
* Sometimes the reflective method discovery logic finds a suitable method that can easily be
* called via reflection but cannot be called from generated code when compiling the expression
* because of visibility restrictions. For example if a non public class overrides toString(), this
* helper method will walk up the type hierarchy to find the first public type that declares the
@ -81,7 +81,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor { @@ -81,7 +81,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor {
clazz.getDeclaredMethod(method.getName(), method.getParameterTypes());
return clazz;
} catch (NoSuchMethodException nsme) {
}
}
Class<?>[] intfaces = clazz.getInterfaces();
@ -93,7 +93,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor { @@ -93,7 +93,7 @@ public class ReflectiveMethodExecutor implements MethodExecutor {
}
return null;
}
public boolean didArgumentConversionOccur() {
return this.argumentConversionOccurred;
}

4
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java

@ -120,7 +120,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { @@ -120,7 +120,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
}
return false;
}
public Member getLastReadInvokerPair() {
return lastReadInvokerPair.member;
}
@ -656,7 +656,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { @@ -656,7 +656,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
public void write(EvaluationContext context, Object target, String name, Object newValue) {
throw new UnsupportedOperationException("Should not be called on an OptimalPropertyAccessor");
}
@Override
public boolean isCompilable() {
return (Modifier.isPublic(this.member.getModifiers()) &&

2
spring-expression/src/test/java/org/springframework/expression/spel/EvaluationTests.java

@ -465,7 +465,7 @@ public class EvaluationTests extends AbstractExpressionTests { @@ -465,7 +465,7 @@ public class EvaluationTests extends AbstractExpressionTests {
assertEquals("T(java.lang.String)", expr.toStringAST());
assertEquals(String.class, expr.getValue(Class.class));
}
@Test
public void operatorVariants() throws Exception {
SpelExpression expr = (SpelExpression)parser.parseExpression("#a < #b");

2
spring-expression/src/test/java/org/springframework/expression/spel/MapTests.java

@ -78,7 +78,7 @@ public class MapTests extends AbstractExpressionTests { @@ -78,7 +78,7 @@ public class MapTests extends AbstractExpressionTests {
public void testInlineMapWithFunkyKeys() {
evaluate("{#root.name:true}","{Nikola Tesla=true}",LinkedHashMap.class);
}
@Test
public void testInlineMapError() {
parseAndCheckError("{key:'abc'", SpelMessage.OOD);

10
spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java

@ -75,12 +75,12 @@ public class SetValueTests extends AbstractExpressionTests { @@ -75,12 +75,12 @@ public class SetValueTests extends AbstractExpressionTests {
setValue("arrayContainer.bytes[1]", (byte) 3);
setValue("arrayContainer.chars[1]", (char) 3);
}
@Test
public void testIsWritableForInvalidExpressions_SPR10610() {
Expression e = null;
StandardEvaluationContext lContext = TestScenarioCreator.getTestEvaluationContext();
// PROPERTYORFIELDREFERENCE
// Non existent field (or property):
e = parser.parseExpression("arrayContainer.wibble");
@ -95,7 +95,7 @@ public class SetValueTests extends AbstractExpressionTests { @@ -95,7 +95,7 @@ public class SetValueTests extends AbstractExpressionTests {
// at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:225)
// success!
}
// VARIABLE
// the variable does not exist (but that is OK, we should be writable)
e = parser.parseExpression("#madeup1");
@ -103,7 +103,7 @@ public class SetValueTests extends AbstractExpressionTests { @@ -103,7 +103,7 @@ public class SetValueTests extends AbstractExpressionTests {
e = parser.parseExpression("#madeup2.bar"); // compound expression
assertFalse("Should not be writable!",e.isWritable(lContext));
// INDEXER
// non existent indexer (wibble made up)
e = parser.parseExpression("arrayContainer.wibble[99]");
@ -113,7 +113,7 @@ public class SetValueTests extends AbstractExpressionTests { @@ -113,7 +113,7 @@ public class SetValueTests extends AbstractExpressionTests {
} catch (SpelEvaluationException see) {
// success!
}
// non existent indexer (index via a string)
e = parser.parseExpression("arrayContainer.ints['abc']");
try {

902
spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java

File diff suppressed because it is too large Load Diff

20
spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationPerformanceTests.java

@ -62,7 +62,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -62,7 +62,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
return duration;
}
}
public static class NumberHolder {
public int payload = 36;
}
@ -97,7 +97,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -97,7 +97,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
System.out.println("Now compiled:");
o = expression.getValue(nh);
assertEquals(2d, o);
stime = System.currentTimeMillis();
for (int i=0;i<1000000;i++) {
o = expression.getValue(nh);
@ -113,7 +113,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -113,7 +113,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
o = expression.getValue(nh);
}
System.out.println("One million iterations: "+(System.currentTimeMillis()-stime)+"ms");
expression = parser.parseExpression("payload/18D");
o = expression.getValue(nh);
assertEquals(2d,o);
@ -137,7 +137,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -137,7 +137,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
System.out.println("Now compiled:");
o = expression.getValue(nh);
assertEquals(2d, o);
stime = System.currentTimeMillis();
for (int i=0;i<1000000;i++) {
o = expression.getValue(nh);
@ -154,7 +154,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -154,7 +154,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
}
System.out.println("One million iterations: "+(System.currentTimeMillis()-stime)+"ms");
}
@Test
public void inlineLists() throws Exception {
expression = parser.parseExpression("{'abcde','ijklm'}[0].substring({1,3,4}[0],{1,3,4}[1])");
@ -180,7 +180,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -180,7 +180,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
System.out.println("Now compiled:");
o = expression.getValue();
assertEquals("bc", o);
stime = System.currentTimeMillis();
for (int i=0;i<1000000;i++) {
o = expression.getValue();
@ -197,7 +197,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -197,7 +197,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
}
System.out.println("One million iterations: "+(System.currentTimeMillis()-stime)+"ms");
}
@Test
public void inlineNestedLists() throws Exception {
expression = parser.parseExpression("{'abcde',{'ijklm','nopqr'}}[1][0].substring({1,3,4}[0],{1,3,4}[1])");
@ -223,7 +223,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -223,7 +223,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
System.out.println("Now compiled:");
o = expression.getValue();
assertEquals("jk", o);
stime = System.currentTimeMillis();
for (int i=0;i<1000000;i++) {
o = expression.getValue();
@ -269,7 +269,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -269,7 +269,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
System.out.println("Now compiled:");
o = expression.getValue(g);
assertEquals("helloworld spring", o);
stime = System.currentTimeMillis();
for (int i=0;i<1000000;i++) {
o = expression.getValue(g);
@ -286,7 +286,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests { @@ -286,7 +286,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
}
System.out.println("One million iterations: "+(System.currentTimeMillis()-stime)+"ms");
}
public static class Greeter {
public String getWorld() {
return "world";

2
spring-expression/src/test/java/org/springframework/expression/spel/testdata/PersonInOtherPackage.java vendored

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.expression.spel.testdata;
/**
*
*
* @author Andy Clement
* @since 4.1.2
*/

8
spring-web/src/test/java/org/springframework/protobuf/Msg.java

@ -129,7 +129,7 @@ public final class Msg extends @@ -129,7 +129,7 @@ public final class Msg extends
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
@ -145,7 +145,7 @@ public final class Msg extends @@ -145,7 +145,7 @@ public final class Msg extends
getFooBytes() {
java.lang.Object ref = foo_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
foo_ = b;
@ -461,7 +461,7 @@ public final class Msg extends @@ -461,7 +461,7 @@ public final class Msg extends
getFooBytes() {
java.lang.Object ref = foo_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
foo_ = b;
@ -610,7 +610,7 @@ public final class Msg extends @@ -610,7 +610,7 @@ public final class Msg extends
* <code>optional .SecondMsg blah = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
org.springframework.protobuf.SecondMsg, org.springframework.protobuf.SecondMsg.Builder, org.springframework.protobuf.SecondMsgOrBuilder>
org.springframework.protobuf.SecondMsg, org.springframework.protobuf.SecondMsg.Builder, org.springframework.protobuf.SecondMsgOrBuilder>
getBlahFieldBuilder() {
if (blahBuilder_ == null) {
blahBuilder_ = new com.google.protobuf.SingleFieldBuilder<

2
spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java

@ -709,7 +709,7 @@ public class MvcNamespaceTests { @@ -709,7 +709,7 @@ public class MvcNamespaceTests {
(DeferredResultProcessingInterceptor[]) fieldAccessor.getPropertyValue("deferredResultInterceptors");
assertEquals(1, deferredResultInterceptors.length);
}
@Test
public void testViewResolution() throws Exception {
loadBeanDefinitions("mvc-config-view-resolution.xml", 6);

Loading…
Cancel
Save