Remove trailing whitespace in Java source code
This commit is contained in:
parent
9d21abcd37
commit
d6d05e8ca0
|
@ -57,7 +57,7 @@ public class FactoryBeanAccessTests {
|
|||
catch (BeanIsNotAFactoryException binafe) {
|
||||
// success
|
||||
}
|
||||
|
||||
|
||||
// No such bean
|
||||
try {
|
||||
expr = new SpelExpressionParser().parseRaw("@truck");
|
||||
|
|
|
@ -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 {
|
|||
public MapGetter() {
|
||||
map.put("foo", "bar");
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Map getMap() {
|
||||
return map;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -192,5 +192,5 @@ public class CompositeContentTypeResolverBuilderTests {
|
|||
WebSessionManager sessionManager = new MockWebSessionManager();
|
||||
return new DefaultServerWebExchange(request, new MockServerHttpResponse(), sessionManager);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class MappingContentTypeResolverTests {
|
|||
assertEquals("application/xml", mediaTypes.get(0).toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static class TestMappingContentTypeResolver extends AbstractMappingContentTypeResolver {
|
||||
|
||||
private final String key;
|
||||
|
|
|
@ -129,7 +129,7 @@ public class SimpleUrlHandlerMappingTests {
|
|||
|
||||
@Configuration
|
||||
static class WebConfig {
|
||||
|
||||
|
||||
@Bean @SuppressWarnings("unused")
|
||||
public SimpleUrlHandlerMapping handlerMapping() {
|
||||
SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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…
Reference in New Issue