Polish test code
Polish a few issue identified when adding checkstyle to the build. Although checkstyle is not enforcing rules on tests, these are a few minor changes that are still worth making. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
81451aa800
commit
1c25cec44f
@@ -175,7 +175,7 @@ public abstract class AbstractAopProxyTests {
|
||||
ProxyFactory pf1 = new ProxyFactory(target1);
|
||||
pf1.addAdvice(new NopInterceptor());
|
||||
pf1.addAdvice(new NopInterceptor());
|
||||
ITestBean proxies[] = new ITestBean[howMany];
|
||||
ITestBean[] proxies = new ITestBean[howMany];
|
||||
for (int i = 0; i < howMany; i++) {
|
||||
proxies[i] = (ITestBean) createAopProxy(pf1).getProxy();
|
||||
assertEquals(age1, proxies[i].getAge());
|
||||
@@ -1356,7 +1356,7 @@ public abstract class AbstractAopProxyTests {
|
||||
rmi.getUserAttributes().putAll(valuesToAdd);
|
||||
return invocation.proceed();
|
||||
}
|
||||
};
|
||||
}
|
||||
AdvisedSupport pc = new AdvisedSupport(ITestBean.class);
|
||||
MapAwareMethodInterceptor mami1 = new MapAwareMethodInterceptor(new HashMap<>(), new HashMap<String, String>());
|
||||
Map<String, String> firstValuesToAdd = new HashMap<>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -191,7 +191,7 @@ public class NotificationPublisherTests extends AbstractMBeanServerTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(String actionName, Object params[], String signature[]) throws MBeanException,
|
||||
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException,
|
||||
ReflectionException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -109,7 +109,7 @@ public class AnnotationTestBean implements IJmxTestBean {
|
||||
@ManagedMetric(description="The QueueSize metric", currencyTimeLimit = 20, persistPolicy="OnUpdate", persistPeriod=300,
|
||||
category="utilization", metricType = MetricType.COUNTER, displayName="Queue Size", unit="messages")
|
||||
public long getQueueSize() {
|
||||
return 100l;
|
||||
return 100L;
|
||||
}
|
||||
|
||||
@ManagedMetric
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -156,7 +156,6 @@ public class JndiTemplateTests {
|
||||
jt.rebind(name, o);
|
||||
verify(context).rebind(name, o);
|
||||
verify(context).close();
|
||||
;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user