Browse Source

Remove trailing whitespace in Java source code

pull/1143/head
Sam Brannen 8 years ago
parent
commit
d6d05e8ca0
  1. 2
      spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java
  2. 18
      spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java
  3. 2
      spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java
  4. 8
      spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java
  5. 20
      spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java
  6. 6
      spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java
  7. 2
      spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java
  8. 2
      spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolver.java
  9. 2
      spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java
  10. 2
      spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java
  11. 2
      spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java
  12. 2
      spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java
  13. 2
      spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java
  14. 2
      spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java

2
spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java

@ -57,7 +57,7 @@ public class FactoryBeanAccessTests { @@ -57,7 +57,7 @@ public class FactoryBeanAccessTests {
catch (BeanIsNotAFactoryException binafe) {
// success
}
// No such bean
try {
expr = new SpelExpressionParser().parseRaw("@truck");

18
spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java

@ -37,34 +37,34 @@ public class MapAccessorTests { @@ -37,34 +37,34 @@ public class MapAccessorTests {
@Test
public void mapAccessorCompilable() {
Map<String, Object> testMap = getSimpleTestMap();
StandardEvaluationContext sec = new StandardEvaluationContext();
StandardEvaluationContext sec = new StandardEvaluationContext();
sec.addPropertyAccessor(new MapAccessor());
SpelExpressionParser sep = new SpelExpressionParser();
// basic
Expression ex = sep.parseExpression("foo");
assertEquals("bar",ex.getValue(sec,testMap));
assertTrue(SpelCompiler.compile(ex));
assertTrue(SpelCompiler.compile(ex));
assertEquals("bar",ex.getValue(sec,testMap));
// compound expression
ex = sep.parseExpression("foo.toUpperCase()");
assertEquals("BAR",ex.getValue(sec,testMap));
assertTrue(SpelCompiler.compile(ex));
assertTrue(SpelCompiler.compile(ex));
assertEquals("BAR",ex.getValue(sec,testMap));
// nested map
Map<String,Map<String,Object>> nestedMap = getNestedTestMap();
ex = sep.parseExpression("aaa.foo.toUpperCase()");
assertEquals("BAR",ex.getValue(sec,nestedMap));
assertTrue(SpelCompiler.compile(ex));
assertTrue(SpelCompiler.compile(ex));
assertEquals("BAR",ex.getValue(sec,nestedMap));
// avoiding inserting checkcast because first part of expression returns a Map
ex = sep.parseExpression("getMap().foo");
MapGetter mapGetter = new MapGetter();
assertEquals("bar",ex.getValue(sec,mapGetter));
assertTrue(SpelCompiler.compile(ex));
assertTrue(SpelCompiler.compile(ex));
assertEquals("bar",ex.getValue(sec,mapGetter));
}
@ -74,7 +74,7 @@ public class MapAccessorTests { @@ -74,7 +74,7 @@ public class MapAccessorTests {
public MapGetter() {
map.put("foo", "bar");
}
@SuppressWarnings("rawtypes")
public Map getMap() {
return map;

2
spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java

@ -129,7 +129,7 @@ public class DefaultConversionService extends GenericConversionService { @@ -129,7 +129,7 @@ public class DefaultConversionService extends GenericConversionService {
converterRegistry.addConverterFactory(new StringToEnumConverterFactory());
converterRegistry.addConverter(new EnumToStringConverter((ConversionService) converterRegistry));
converterRegistry.addConverterFactory(new IntegerToEnumConverterFactory());
converterRegistry.addConverter(new EnumToIntegerConverter((ConversionService) converterRegistry));

8
spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java

@ -244,22 +244,22 @@ public class DefaultConversionServiceTests { @@ -244,22 +244,22 @@ public class DefaultConversionServiceTests {
public void testEnumToString() {
assertEquals("BAR", conversionService.convert(Foo.BAR, String.class));
}
@Test
public void testIntegerToEnum() throws Exception {
assertEquals(Foo.BAR, conversionService.convert(0, Foo.class));
}
@Test
public void testIntegerToEnumWithSubclass() throws Exception {
assertEquals(SubFoo.BAZ, conversionService.convert(1, SubFoo.BAR.getClass()));
}
@Test
public void testIntegerToEnumNull() {
assertEquals(null, conversionService.convert(null, Foo.class));
}
@Test
public void testEnumToInteger() {
assertEquals(Integer.valueOf(0), conversionService.convert(Foo.BAR, Integer.class));

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

@ -248,7 +248,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -248,7 +248,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals(false,expression.getValue());
assertCanCompile(expression);
assertEquals(false,expression.getValue());
// double slot left operand - should get boxed, return false
expression = parse("3.0d instanceof T(Integer)");
assertEquals(false,expression.getValue());
@ -260,7 +260,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -260,7 +260,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals(true,expression.getValue());
assertCanCompile(expression);
assertEquals(true,expression.getValue());
// Only when the right hand operand is a direct type reference
// will it be compilable.
StandardEvaluationContext ctx = new StandardEvaluationContext();
@ -275,13 +275,13 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -275,13 +275,13 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals(false,expression.getValue());
assertCanCompile(expression);
assertEquals(false,expression.getValue());
expression = parse("3 instanceof T(long)");
assertEquals(false,expression.getValue());
assertCanCompile(expression);
assertEquals(false,expression.getValue());
}
@Test
public void stringLiteral() throws Exception {
expression = parser.parseExpression("'abcde'");
@ -3047,7 +3047,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -3047,7 +3047,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals("java.lang.String",expression.getValue());
assertCanCompile(expression);
assertEquals("java.lang.String",expression.getValue());
// These tests below verify that the chain of static accesses (either method/property or field)
// leave the right thing on top of the stack for processing by any outer consuming code.
// Here the consuming code is the String.valueOf() function. If the wrong thing were on
@ -3089,7 +3089,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -3089,7 +3089,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals("fb",expression.getValue(StaticsHelper.sh));
assertCanCompile(expression);
assertEquals("fb",expression.getValue(StaticsHelper.sh));
expression = parser.parseExpression("T(String).valueOf(propertya.propertyb)");
assertEquals("pb",expression.getValue(StaticsHelper.sh));
assertCanCompile(expression);
@ -3099,7 +3099,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -3099,7 +3099,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
assertEquals("mb",expression.getValue(StaticsHelper.sh));
assertCanCompile(expression);
assertEquals("mb",expression.getValue(StaticsHelper.sh));
}
@Test
@ -5493,7 +5493,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -5493,7 +5493,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
public static String methodb() {
return "mb";
}
public static StaticsHelper getPropertya() {
return sh;
}
@ -5501,11 +5501,11 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests { @@ -5501,11 +5501,11 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
public static String getPropertyb() {
return "pb";
}
public static StaticsHelper fielda = sh;
public static String fieldb = "fb";
public String toString() {
return "sh";
}

6
spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java

@ -1964,7 +1964,7 @@ public class SpelReproTests extends AbstractExpressionTests { @@ -1964,7 +1964,7 @@ public class SpelReproTests extends AbstractExpressionTests {
assertEquals("custard", expr.getValue(context));
expr = new SpelExpressionParser().parseRaw("&foo");
assertEquals("foo factory",expr.getValue(context));
try {
expr = new SpelExpressionParser().parseRaw("&@foo");
fail("Illegal syntax, error expected");
@ -1973,7 +1973,7 @@ public class SpelReproTests extends AbstractExpressionTests { @@ -1973,7 +1973,7 @@ public class SpelReproTests extends AbstractExpressionTests {
assertEquals(SpelMessage.INVALID_BEAN_REFERENCE,spe.getMessageCode());
assertEquals(0,spe.getPosition());
}
try {
expr = new SpelExpressionParser().parseRaw("@&foo");
fail("Illegal syntax, error expected");
@ -1981,7 +1981,7 @@ public class SpelReproTests extends AbstractExpressionTests { @@ -1981,7 +1981,7 @@ public class SpelReproTests extends AbstractExpressionTests {
catch (SpelParseException spe) {
assertEquals(SpelMessage.INVALID_BEAN_REFERENCE,spe.getMessageCode());
assertEquals(0,spe.getPosition());
}
}
}
@Test

2
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java

@ -72,7 +72,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @@ -72,7 +72,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests {
{ AlwaysFailingAfterTestExecutionTestCase.class.getSimpleName(), 1, 0, 1, 0 },
{ AlwaysFailingAfterTestMethodTestCase.class.getSimpleName(), 1, 1, 0, 1 },
{ FailingBeforeTransactionTestCase.class.getSimpleName(), 1, 0, 0, 1 },
{ FailingAfterTransactionTestCase.class.getSimpleName(), 1, 1, 0, 1 }
{ FailingAfterTransactionTestCase.class.getSimpleName(), 1, 1, 0, 1 }
};
// @formatter:on
}

2
spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolver.java

@ -36,7 +36,7 @@ import org.springframework.web.server.ServerWebExchange; @@ -36,7 +36,7 @@ import org.springframework.web.server.ServerWebExchange;
*/
public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver {
/**
* @param beanFactory a bean factory to use for resolving ${...}
* placeholder and #{...} SpEL expressions in default values;

2
spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java

@ -192,5 +192,5 @@ public class CompositeContentTypeResolverBuilderTests { @@ -192,5 +192,5 @@ public class CompositeContentTypeResolverBuilderTests {
WebSessionManager sessionManager = new MockWebSessionManager();
return new DefaultServerWebExchange(request, new MockServerHttpResponse(), sessionManager);
}
}

2
spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java

@ -98,7 +98,7 @@ public class MappingContentTypeResolverTests { @@ -98,7 +98,7 @@ public class MappingContentTypeResolverTests {
assertEquals("application/xml", mediaTypes.get(0).toString());
}
private static class TestMappingContentTypeResolver extends AbstractMappingContentTypeResolver {
private final String key;

2
spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java

@ -129,7 +129,7 @@ public class SimpleUrlHandlerMappingTests { @@ -129,7 +129,7 @@ public class SimpleUrlHandlerMappingTests {
@Configuration
static class WebConfig {
@Bean @SuppressWarnings("unused")
public SimpleUrlHandlerMapping handlerMapping() {
SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping();

2
spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java

@ -57,7 +57,7 @@ public class HeadersRequestConditionTests { @@ -57,7 +57,7 @@ public class HeadersRequestConditionTests {
public void headerPresent() throws Exception {
ServerWebExchange exchange = createExchange("Accept", "");
HeadersRequestCondition condition = new HeadersRequestCondition("accept");
assertNotNull(condition.getMatchingCondition(exchange));
}

2
spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java

@ -124,7 +124,7 @@ public class RxNettyServerHttpResponse extends AbstractServerHttpResponse { @@ -124,7 +124,7 @@ public class RxNettyServerHttpResponse extends AbstractServerHttpResponse {
We should revisit this code once
https://github.com/ReactiveX/RxNetty/issues/194 has been fixed.
@Override
public Mono<Void> writeWith(File file, long position, long count) {

2
spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java

@ -102,7 +102,7 @@ public class Jackson2JsonEncoderTests extends AbstractDataBufferAllocatingTestCa @@ -102,7 +102,7 @@ public class Jackson2JsonEncoderTests extends AbstractDataBufferAllocatingTestCa
.assertValuesWith(stringConsumer("{\"withView1\":\"with\"}"));
}
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
private static class ParentClass {
}

Loading…
Cancel
Save