commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: svn commit: r989199 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/SerializationUtils.java test/java/org/apache/commons/lang3/SerializationUtilsTest.java
Date Thu, 26 Aug 2010 10:59:57 GMT
On Thu, Aug 26, 2010 at 6:48 AM, Stephen Colebourne
<scolebourne@joda.org> wrote:
> I add this "auto-cast" behaviour to some of my classes too. Its a
> useful technique to handle annoying cases. However, the alternative:
>  Person p = SerializableUtils.deserialize(Person.class, bytes);
> is more widely used.
>

But, using "Person.class," as opposed to "(Person)" is more characters
and doesn't really save you anything.  Either way, you get a runtime
exception if you screw up.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message