提交 fb898e17 编写于 作者: J Johnny Lim 提交者: Juergen Hoeller

Remove inconsistent spaces

上级 8f21cb1a
......@@ -48,7 +48,7 @@ public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Seriali
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
this.advice.before(mi.getMethod(), mi.getArguments(), mi.getThis() );
this.advice.before(mi.getMethod(), mi.getArguments(), mi.getThis());
return mi.proceed();
}
......
......@@ -70,13 +70,13 @@ public class HotSwappableTargetSourceTests {
@Test
public void testBasicFunctionality() {
SideEffectBean proxied = (SideEffectBean) beanFactory.getBean("swappable");
assertEquals(INITIAL_COUNT, proxied.getCount() );
assertEquals(INITIAL_COUNT, proxied.getCount());
proxied.doWork();
assertEquals(INITIAL_COUNT + 1, proxied.getCount() );
assertEquals(INITIAL_COUNT + 1, proxied.getCount());
proxied = (SideEffectBean) beanFactory.getBean("swappable");
proxied.doWork();
assertEquals(INITIAL_COUNT + 2, proxied.getCount() );
assertEquals(INITIAL_COUNT + 2, proxied.getCount());
}
@Test
......@@ -85,9 +85,9 @@ public class HotSwappableTargetSourceTests {
SideEffectBean target2 = (SideEffectBean) beanFactory.getBean("target2");
SideEffectBean proxied = (SideEffectBean) beanFactory.getBean("swappable");
assertEquals(target1.getCount(), proxied.getCount() );
assertEquals(target1.getCount(), proxied.getCount());
proxied.doWork();
assertEquals(INITIAL_COUNT + 1, proxied.getCount() );
assertEquals(INITIAL_COUNT + 1, proxied.getCount());
HotSwappableTargetSource swapper = (HotSwappableTargetSource) beanFactory.getBean("swapper");
Object old = swapper.swap(target2);
......
......@@ -56,14 +56,14 @@ public class PrototypeTargetSourceTests {
@Test
public void testPrototypeAndSingletonBehaveDifferently() {
SideEffectBean singleton = (SideEffectBean) beanFactory.getBean("singleton");
assertEquals(INITIAL_COUNT, singleton.getCount() );
assertEquals(INITIAL_COUNT, singleton.getCount());
singleton.doWork();
assertEquals(INITIAL_COUNT + 1, singleton.getCount() );
assertEquals(INITIAL_COUNT + 1, singleton.getCount());
SideEffectBean prototype = (SideEffectBean) beanFactory.getBean("prototype");
assertEquals(INITIAL_COUNT, prototype.getCount() );
assertEquals(INITIAL_COUNT, prototype.getCount());
prototype.doWork();
assertEquals(INITIAL_COUNT, prototype.getCount() );
assertEquals(INITIAL_COUNT, prototype.getCount());
}
......
......@@ -62,9 +62,9 @@ public class ThreadLocalTargetSourceTests {
@Test
public void testUseDifferentManagedInstancesInSameThread() {
SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
assertEquals(INITIAL_COUNT, apartment.getCount() );
assertEquals(INITIAL_COUNT, apartment.getCount());
apartment.doWork();
assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
assertEquals(INITIAL_COUNT + 1, apartment.getCount());
ITestBean test = (ITestBean) beanFactory.getBean("threadLocal2");
assertEquals("Rod", test.getName());
......@@ -74,12 +74,12 @@ public class ThreadLocalTargetSourceTests {
@Test
public void testReuseInSameThread() {
SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
assertEquals(INITIAL_COUNT, apartment.getCount() );
assertEquals(INITIAL_COUNT, apartment.getCount());
apartment.doWork();
assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
assertEquals(INITIAL_COUNT + 1, apartment.getCount());
apartment = (SideEffectBean) beanFactory.getBean("apartment");
assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
assertEquals(INITIAL_COUNT + 1, apartment.getCount());
}
/**
......@@ -106,20 +106,20 @@ public class ThreadLocalTargetSourceTests {
@Test
public void testNewThreadHasOwnInstance() throws InterruptedException {
SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
assertEquals(INITIAL_COUNT, apartment.getCount() );
assertEquals(INITIAL_COUNT, apartment.getCount());
apartment.doWork();
apartment.doWork();
apartment.doWork();
assertEquals(INITIAL_COUNT + 3, apartment.getCount() );
assertEquals(INITIAL_COUNT + 3, apartment.getCount());
class Runner implements Runnable {
public SideEffectBean mine;
@Override
public void run() {
this.mine = (SideEffectBean) beanFactory.getBean("apartment");
assertEquals(INITIAL_COUNT, mine.getCount() );
assertEquals(INITIAL_COUNT, mine.getCount());
mine.doWork();
assertEquals(INITIAL_COUNT + 1, mine.getCount() );
assertEquals(INITIAL_COUNT + 1, mine.getCount());
}
}
Runner r = new Runner();
......@@ -130,11 +130,11 @@ public class ThreadLocalTargetSourceTests {
assertNotNull(r);
// Check it didn't affect the other thread's copy
assertEquals(INITIAL_COUNT + 3, apartment.getCount() );
assertEquals(INITIAL_COUNT + 3, apartment.getCount());
// When we use other thread's copy in this thread
// it should behave like ours
assertEquals(INITIAL_COUNT + 3, r.mine.getCount() );
assertEquals(INITIAL_COUNT + 3, r.mine.getCount());
// Bound to two threads
assertEquals(2, ((ThreadLocalTargetSourceStats) apartment).getObjectCount());
......
......@@ -260,22 +260,22 @@ public class ProxyFactoryBeanTests {
// Check it works without AOP
SideEffectBean raw = (SideEffectBean) bf.getBean("prototypeTarget");
assertEquals(INITIAL_COUNT, raw.getCount() );
assertEquals(INITIAL_COUNT, raw.getCount());
raw.doWork();
assertEquals(INITIAL_COUNT+1, raw.getCount() );
assertEquals(INITIAL_COUNT+1, raw.getCount());
raw = (SideEffectBean) bf.getBean("prototypeTarget");
assertEquals(INITIAL_COUNT, raw.getCount() );
assertEquals(INITIAL_COUNT, raw.getCount());
// Now try with advised instances
SideEffectBean prototype2FirstInstance = (SideEffectBean) bf.getBean(beanName);
assertEquals(INITIAL_COUNT, prototype2FirstInstance.getCount() );
assertEquals(INITIAL_COUNT, prototype2FirstInstance.getCount());
prototype2FirstInstance.doWork();
assertEquals(INITIAL_COUNT + 1, prototype2FirstInstance.getCount() );
assertEquals(INITIAL_COUNT + 1, prototype2FirstInstance.getCount());
SideEffectBean prototype2SecondInstance = (SideEffectBean) bf.getBean(beanName);
assertFalse("Prototypes are not ==", prototype2FirstInstance == prototype2SecondInstance);
assertEquals(INITIAL_COUNT, prototype2SecondInstance.getCount() );
assertEquals(INITIAL_COUNT + 1, prototype2FirstInstance.getCount() );
assertEquals(INITIAL_COUNT, prototype2SecondInstance.getCount());
assertEquals(INITIAL_COUNT + 1, prototype2FirstInstance.getCount());
return prototype2FirstInstance;
}
......
......@@ -84,7 +84,7 @@ public class CommonsPool2TargetSourceTests {
// Just check that it works--we can't make assumptions
// about the count
pooled.doWork();
//assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
//assertEquals(INITIAL_COUNT + 1, apartment.getCount());
}
@Test
......
......@@ -132,7 +132,7 @@ public abstract class AbstractCacheTests<T extends Cache> {
String key = createRandomKey();
assertNull(cache.get(key));
Object value = cache.get(key, () -> returnValue );
Object value = cache.get(key, () -> returnValue);
assertEquals(returnValue, value);
assertEquals(value, cache.get(key).get());
}
......
......@@ -89,7 +89,7 @@ public class LocalSlsbInvokerInterceptorTests {
LocalSlsbInvokerInterceptor si = configuredInterceptor(mockContext, jndiName);
ProxyFactory pf = new ProxyFactory(new Class<?>[] { BusinessMethods.class } );
ProxyFactory pf = new ProxyFactory(new Class<?>[] { BusinessMethods.class });
pf.addAdvice(si);
BusinessMethods target = (BusinessMethods) pf.getProxy();
......@@ -110,7 +110,7 @@ public class LocalSlsbInvokerInterceptorTests {
LocalSlsbInvokerInterceptor si = configuredInterceptor(mockContext, jndiName);
ProxyFactory pf = new ProxyFactory(new Class<?>[] { BusinessMethods.class } );
ProxyFactory pf = new ProxyFactory(new Class<?>[] { BusinessMethods.class });
pf.addAdvice(si);
BusinessMethods target = (BusinessMethods) pf.getProxy();
......@@ -129,7 +129,7 @@ public class LocalSlsbInvokerInterceptorTests {
LocalSlsbInvokerInterceptor si = configuredInterceptor(mockContext, jndiName);
ProxyFactory pf = new ProxyFactory(new Class<?>[] { LocalInterfaceWithBusinessMethods.class } );
ProxyFactory pf = new ProxyFactory(new Class<?>[] { LocalInterfaceWithBusinessMethods.class });
pf.addAdvice(si);
LocalInterfaceWithBusinessMethods target = (LocalInterfaceWithBusinessMethods) pf.getProxy();
......
......@@ -112,7 +112,7 @@ public class SqlLobValueTests {
lob.setTypeValue(preparedStatement, 1, Types.CLOB, "test");
verify(creator).setClobAsAsciiStream(eq(preparedStatement), eq(1), inputStreamCaptor.capture(), eq(3));
byte[] bytes = new byte[3];
inputStreamCaptor.getValue().read(bytes );
inputStreamCaptor.getValue().read(bytes);
assertThat(bytes, equalTo(testContent));
}
......
......@@ -73,7 +73,7 @@ public class HeaderMethodArgumentResolver extends AbstractNamedValueMethodArgume
logger.warn("Message headers contain two values for the same header '" + name + "', " +
"one in the top level header map and a second in the nested map with native headers. " +
"Using the value from top level map. " +
"Use 'nativeHeader.myHeader' to resolve to the value from the nested native header map." );
"Use 'nativeHeader.myHeader' to resolve to the value from the nested native header map.");
}
}
......
......@@ -406,7 +406,7 @@ public abstract class AbstractTransactionAspectTests {
}
catch (Throwable t) {
if (rollbackException) {
assertEquals("Caught wrong exception", tex, t );
assertEquals("Caught wrong exception", tex, t);
}
else {
assertEquals("Caught wrong exception", ex, t);
......
......@@ -260,7 +260,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View {
}
if (jsonpFunction != null) {
generator.writeRaw("/**/");
generator.writeRaw(jsonpFunction + "(" );
generator.writeRaw(jsonpFunction + "(");
}
}
......
......@@ -354,7 +354,7 @@ public class RequestMappingInfoHandlerMappingTests {
urlPathHelper.setUrlDecode(false);
urlPathHelper.setRemoveSemicolonContent(false);
this.handlerMapping.setUrlPathHelper(urlPathHelper );
this.handlerMapping.setUrlPathHelper(urlPathHelper);
request = new MockHttpServletRequest();
handleMatch(request, "/path{filter}", "/path;mvar=a%2fb");
......@@ -534,4 +534,4 @@ public class RequestMappingInfoHandlerMappingTests {
}
}
}
\ No newline at end of file
}
......@@ -89,7 +89,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
private long heartbeatTime = TimeUnit.SECONDS.toMillis(25);
private long disconnectDelay = TimeUnit.SECONDS.toMillis(5 );
private long disconnectDelay = TimeUnit.SECONDS.toMillis(5);
private int httpMessageCacheSize = 100;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册