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:
parent
4f2f0e47d2
commit
2f67045b96
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue