commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1477829 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag: UnmodifiableBag.java UnmodifiableSortedBag.java
Date Tue, 30 Apr 2013 21:11:29 GMT
Author: sebb
Date: Tue Apr 30 21:11:28 2013
New Revision: 1477829

URL: http://svn.apache.org/r1477829
Log:
Document some valid @SuppressWarnings

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java?rev=1477829&r1=1477828&r2=1477829&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
Tue Apr 30 21:11:28 2013
@@ -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();

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java?rev=1477829&r1=1477828&r2=1477829&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
Tue Apr 30 21:11:28 2013
@@ -91,8 +91,9 @@ public final class UnmodifiableSortedBag
      * @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();



Mime
View raw message