Added a brief comment to explain SuppressWarnings statement (thanks britter).

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1672242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Duncan Jones 2015-04-09 05:54:52 +00:00
parent 4f2f0e47d2
commit 2f67045b96
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ public class SerializationUtils {
* @return the serialized and deseralized object
* @since 3.3
*/
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") // OK, because we serialized a type `T`
public static <T extends Serializable> T roundtrip(final T msg) {
return (T) SerializationUtils.deserialize(SerializationUtils.serialize(msg));
}