From b26d2268ca09f8aceaef9d17fc695fb0232dd6ad Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Tue, 23 Nov 2010 01:02:23 +0000 Subject: [PATCH] We need this cast() method on InvocationListener too since that's getting used that way in genservice. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6297 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/data/InvocationMarshaller.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/threerings/presents/data/InvocationMarshaller.java b/src/main/java/com/threerings/presents/data/InvocationMarshaller.java index f166c61fa..d959d1b9a 100644 --- a/src/main/java/com/threerings/presents/data/InvocationMarshaller.java +++ b/src/main/java/com/threerings/presents/data/InvocationMarshaller.java @@ -129,6 +129,15 @@ public class InvocationMarshaller } } + /** + * Performs type casts in a way that works for parameterized types as well as simple types. + */ + @SuppressWarnings("unchecked") + protected K cast (Object value) + { + return (K)value; + } + /** On the server, the id of the invocation method. */ protected transient String _invId; }