diff --git a/spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java b/spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java index e1e1ca3e5c..9a61353ce7 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java @@ -57,7 +57,7 @@ public class FactoryBeanAccessTests { catch (BeanIsNotAFactoryException binafe) { // success } - + // No such bean try { expr = new SpelExpressionParser().parseRaw("@truck"); diff --git a/spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java b/spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java index 34ca82b355..2b28b5167a 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java @@ -37,34 +37,34 @@ public class MapAccessorTests { @Test public void mapAccessorCompilable() { Map 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> 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 { public MapGetter() { map.put("foo", "bar"); } - + @SuppressWarnings("rawtypes") public Map getMap() { return map; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java index 697f3b4f21..2cc1c5b3fa 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java @@ -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)); diff --git a/spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java index a0b78a5fb5..2f144e49b4 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java @@ -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)); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java index f5a0c19944..0ef848a276 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java @@ -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 { 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 { 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 { 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 { 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 { assertEquals("mb",expression.getValue(StaticsHelper.sh)); assertCanCompile(expression); assertEquals("mb",expression.getValue(StaticsHelper.sh)); - + } @Test @@ -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 { public static String getPropertyb() { return "pb"; } - + public static StaticsHelper fielda = sh; public static String fieldb = "fb"; - + public String toString() { return "sh"; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java index f351df70b4..683bf19a90 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java @@ -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 { 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 { catch (SpelParseException spe) { assertEquals(SpelMessage.INVALID_BEAN_REFERENCE,spe.getMessageCode()); assertEquals(0,spe.getPosition()); - } + } } @Test diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java index bdb99b44d5..8a28865763 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java @@ -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 } diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolver.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolver.java index 16f5bc4004..d5d5098015 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolver.java +++ b/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; */ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver { - + /** * @param beanFactory a bean factory to use for resolving ${...} * placeholder and #{...} SpEL expressions in default values; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java index 74fd266380..279a9fac12 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/CompositeContentTypeResolverBuilderTests.java @@ -192,5 +192,5 @@ public class CompositeContentTypeResolverBuilderTests { WebSessionManager sessionManager = new MockWebSessionManager(); return new DefaultServerWebExchange(request, new MockServerHttpResponse(), sessionManager); } - + } diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java index 6c2cd5a30a..3b7684353b 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/MappingContentTypeResolverTests.java @@ -98,7 +98,7 @@ public class MappingContentTypeResolverTests { assertEquals("application/xml", mediaTypes.get(0).toString()); } - + private static class TestMappingContentTypeResolver extends AbstractMappingContentTypeResolver { private final String key; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java index bb1b405f16..c863f32613 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java @@ -129,7 +129,7 @@ public class SimpleUrlHandlerMappingTests { @Configuration static class WebConfig { - + @Bean @SuppressWarnings("unused") public SimpleUrlHandlerMapping handlerMapping() { SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping(); diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java index 860e6d7001..f1f1ad6ae5 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java @@ -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)); } diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java index 75758fcd64..6ce89768a6 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java @@ -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 writeWith(File file, long position, long count) { diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java index 1ff19cbc6e..bbfe2320ab 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java @@ -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 { }