Document some valid @SuppressWarnings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2013-04-30 21:11:28 +00:00
parent 4b2778dd4a
commit 9f0af0bfee
2 changed files with 4 additions and 2 deletions

View File

@ -91,8 +91,9 @@ public final class UnmodifiableBag<E>
* @param in the input stream
* @throws IOException
* @throws ClassNotFoundException
* @throws ClassCastException if deserialised object has wrong type
*/
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") // will throw CCE, see Javadoc
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
collection = (Collection<E>) in.readObject();

View File

@ -91,8 +91,9 @@ public final class UnmodifiableSortedBag<E>
* @param in the input stream
* @throws IOException
* @throws ClassNotFoundException
* @throws ClassCastException if deserialised object has wrong type
*/
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") // will throw CCE, see Javadoc
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
collection = (Collection<E>) in.readObject();