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 ClassNotFoundException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect
|
||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
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
|
||||
* @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 {
|
||||
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;
|
||||
}
|
||||
|
||||
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())
|
||||
&& getValue().equals(node.getValue()));
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class MockTestCase {
|
|||
private List<Object> mockObjects = new ArrayList<Object>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T> T createMock(Class name) {
|
||||
protected <T> T createMock(Class<?> name) {
|
||||
T mock = (T) EasyMock.createMock(name);
|
||||
return registerMock(mock);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue