Document unused items
Raw types git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
223eafb8c9
commit
a80284f4c5
|
@ -68,15 +68,16 @@ public class ConstructorUtilsTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class PrivateClass {
|
private static class PrivateClass {
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public PrivateClass() {
|
public PrivateClass() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map classCache;
|
private Map<Class<?>, Class<?>[]> classCache;
|
||||||
|
|
||||||
public ConstructorUtilsTest(String name) {
|
public ConstructorUtilsTest(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
classCache = new HashMap();
|
classCache = new HashMap<Class<?>, Class<?>[]>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -210,21 +211,21 @@ public class ConstructorUtilsTest extends TestCase {
|
||||||
singletonArray(Double.TYPE), singletonArray(Double.TYPE));
|
singletonArray(Double.TYPE), singletonArray(Double.TYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void expectMatchingAccessibleConstructorParameterTypes(Class cls,
|
private void expectMatchingAccessibleConstructorParameterTypes(Class<?> cls,
|
||||||
Class[] requestTypes, Class[] actualTypes) {
|
Class<?>[] requestTypes, Class<?>[] actualTypes) {
|
||||||
Constructor c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
|
Constructor<?> c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
|
||||||
requestTypes);
|
requestTypes);
|
||||||
assertTrue(toString(c.getParameterTypes()) + " not equals "
|
assertTrue(toString(c.getParameterTypes()) + " not equals "
|
||||||
+ toString(actualTypes), Arrays.equals(actualTypes, c
|
+ toString(actualTypes), Arrays.equals(actualTypes, c
|
||||||
.getParameterTypes()));
|
.getParameterTypes()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String toString(Class[] c) {
|
private String toString(Class<?>[] c) {
|
||||||
return Arrays.asList(c).toString();
|
return Arrays.asList(c).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Class[] singletonArray(Class c) {
|
private Class<?>[] singletonArray(Class<?> c) {
|
||||||
Class[] result = (Class[]) classCache.get(c);
|
Class<?>[] result = classCache.get(c);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = new Class[] { c };
|
result = new Class[] { c };
|
||||||
classCache.put(c, result);
|
classCache.put(c, result);
|
||||||
|
|
Loading…
Reference in New Issue