commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1199718 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java
Date Wed, 09 Nov 2011 12:43:20 GMT
Author: sebb
Date: Wed Nov  9 12:43:20 2011
New Revision: 1199718

URL: http://svn.apache.org/viewvc?rev=1199718&view=rev
Log:
Suppress generic warning

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java?rev=1199718&r1=1199717&r2=1199718&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SerializationUtils.java
Wed Nov  9 12:43:20 2011
@@ -89,7 +89,9 @@ public class SerializationUtils {
              * it is reasonable to assume the deserialized object
              * is of the same type as the original serialized object
              */
-            return (T) in.readObject();
+            @SuppressWarnings("unchecked") // see above
+            T readObject = (T) in.readObject();
+            return readObject;
 
         } catch (ClassNotFoundException ex) {
             throw new SerializationException("ClassNotFoundException while reading cloned
object data", ex);



Mime
View raw message