Add casts to avoid some JDK1.5 compilation warnings
bug 35474, from Will Pugh git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@201765 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1f92df311
commit
0fdd5982c3
|
@ -20,6 +20,11 @@
|
|||
<body>
|
||||
<center><h2>RELEASE NOTES: COLLECTIONS 3.2</h2></center>
|
||||
|
||||
<p>
|
||||
Commons collections is a project to develop and maintain collection classes
|
||||
based on and inspired by the JDK collection framework.
|
||||
This project is JDK1.2 compatible, and does not use JDK1.5 generics.
|
||||
</p>
|
||||
<p>
|
||||
This release adds various new classes and fixes a number of bugs.
|
||||
All feedback should be directed to commons-user at jakarta.apache.org.
|
||||
|
@ -74,6 +79,7 @@ If this causes major headaches to anyone please contact commons-dev at jakarta.a
|
|||
<li>BoundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [33071]</li>
|
||||
<li>IteratorChain.remove() - Fix to avoid IllegalStateException when one of the underlying iterators is a FilterIterator [34267]</li>
|
||||
<li>ExtendedProperties.convertProperties() - Fix to handle default properties maps correctly [32204]</li>
|
||||
<li>Add casts to avoid some JDK1.5 compilation warnings [35474]</li>
|
||||
</ul>
|
||||
|
||||
<center><h3>JAVADOC</h3></center>
|
||||
|
|
|
@ -276,6 +276,9 @@
|
|||
<contributor>
|
||||
<name>Jonas Van Poucke</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Will Pugh</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Herve Quiroz</name>
|
||||
</contributor>
|
||||
|
|
|
@ -895,9 +895,9 @@ public class IteratorUtils {
|
|||
|
||||
} else {
|
||||
try {
|
||||
Method method = obj.getClass().getMethod("iterator", null);
|
||||
Method method = obj.getClass().getMethod("iterator", (Class[]) null);
|
||||
if (Iterator.class.isAssignableFrom(method.getReturnType())) {
|
||||
Iterator it = (Iterator) method.invoke(obj, null);
|
||||
Iterator it = (Iterator) method.invoke(obj, (Object[]) null);
|
||||
if (it != null) {
|
||||
return it;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class PrototypeFactory {
|
|||
return ConstantFactory.NULL_INSTANCE;
|
||||
}
|
||||
try {
|
||||
Method method = prototype.getClass().getMethod("clone", null);
|
||||
Method method = prototype.getClass().getMethod("clone", (Class[]) null);
|
||||
return new PrototypeCloneFactory(prototype, method);
|
||||
|
||||
} catch (NoSuchMethodException ex) {
|
||||
|
@ -116,7 +116,7 @@ public class PrototypeFactory {
|
|||
*/
|
||||
private void findCloneMethod() {
|
||||
try {
|
||||
iCloneMethod = iPrototype.getClass().getMethod("clone", null);
|
||||
iCloneMethod = iPrototype.getClass().getMethod("clone", (Class[]) null);
|
||||
|
||||
} catch (NoSuchMethodException ex) {
|
||||
throw new IllegalArgumentException("PrototypeCloneFactory: The clone method must exist and be public ");
|
||||
|
@ -135,7 +135,7 @@ public class PrototypeFactory {
|
|||
}
|
||||
|
||||
try {
|
||||
return iCloneMethod.invoke(iPrototype, null);
|
||||
return iCloneMethod.invoke(iPrototype, (Object[])null);
|
||||
|
||||
} catch (IllegalAccessException ex) {
|
||||
throw new FunctorException("PrototypeCloneFactory: Clone method must be public", ex);
|
||||
|
|
|
@ -354,7 +354,7 @@ class BulkTestSuiteMaker {
|
|||
|
||||
BulkTest bulk2;
|
||||
try {
|
||||
bulk2 = (BulkTest)m.invoke(bulk, null);
|
||||
bulk2 = (BulkTest)m.invoke(bulk, (Object[]) null);
|
||||
if (bulk2 == null) return;
|
||||
} catch (InvocationTargetException ex) {
|
||||
ex.getTargetException().printStackTrace();
|
||||
|
@ -412,7 +412,7 @@ class BulkTestSuiteMaker {
|
|||
private static BulkTest makeTestCase(Class c, Method m) {
|
||||
Constructor con = getTestCaseConstructor(c);
|
||||
try {
|
||||
return (BulkTest)con.newInstance(new String[] { m.getName() });
|
||||
return (BulkTest)con.newInstance(new Object[] {m.getName()});
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(); // FIXME;
|
||||
|
|
|
@ -330,7 +330,7 @@ public class TestBeanMap extends AbstractTestMap {
|
|||
|
||||
public void testMethodAccessor() throws Exception {
|
||||
BeanMap map = (BeanMap) makeFullMap();
|
||||
Method method = BeanWithProperties.class.getDeclaredMethod("getSomeIntegerValue", null);
|
||||
Method method = BeanWithProperties.class.getDeclaredMethod("getSomeIntegerValue", (Class[]) null);
|
||||
assertEquals(method, map.getReadMethod("someIntegerValue"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue