git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1024472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2d69bd58ab
commit
f6ac90fca9
|
@ -78,10 +78,10 @@ public final class UnmodifiableSortedSet<E>
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
collection = (Collection) in.readObject();
|
collection = (Collection<E>) in.readObject(); // (1)
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
|
@ -137,10 +137,10 @@ public class TransformedMap<J, K, U, V> extends AbstractIterableGetMapDecorator<
|
||||||
* @throws ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
* @since Commons Collections 3.1
|
* @since Commons Collections 3.1
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
map = (Map) in.readObject();
|
map = (Map<K, V>) in.readObject(); // (1)
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
|
@ -108,7 +108,8 @@ class LocalTestNode<K extends Comparable<K>, V extends Comparable<V>> implements
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalTestNode node = (LocalTestNode) o;
|
@SuppressWarnings("unchecked") // o has the correct class - see above
|
||||||
|
LocalTestNode<K, V> node = (LocalTestNode<K, V>) o;
|
||||||
|
|
||||||
return (getKey().equals(node.getKey())
|
return (getKey().equals(node.getKey())
|
||||||
&& getValue().equals(node.getValue()));
|
&& getValue().equals(node.getValue()));
|
||||||
|
|
|
@ -34,7 +34,7 @@ public abstract class MockTestCase {
|
||||||
private List<Object> mockObjects = new ArrayList<Object>();
|
private List<Object> mockObjects = new ArrayList<Object>();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected <T> T createMock(Class name) {
|
protected <T> T createMock(Class<?> name) {
|
||||||
T mock = (T) EasyMock.createMock(name);
|
T mock = (T) EasyMock.createMock(name);
|
||||||
return registerMock(mock);
|
return registerMock(mock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue