Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9448F9D59 for ; Fri, 6 Apr 2012 20:58:33 +0000 (UTC) Received: (qmail 93251 invoked by uid 500); 6 Apr 2012 20:58:33 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 93182 invoked by uid 500); 6 Apr 2012 20:58:33 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 93173 invoked by uid 99); 6 Apr 2012 20:58:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 20:58:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garydgregory@gmail.com designates 209.85.160.43 as permitted sender) Received: from [209.85.160.43] (HELO mail-pb0-f43.google.com) (209.85.160.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 20:58:26 +0000 Received: by pbcwz12 with SMTP id wz12so2956612pbc.30 for ; Fri, 06 Apr 2012 13:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KT6nYQ133BDD1R14clP6dO8nJB7SHgPIiTTSJUrqbZg=; b=YYUcSavhu+G2ceXSZIquHV4Z1CYVfFoQ2SB5E1KEV8mgBMNqiiCqkeggECYQl6TGQk CEs7lKnNkAqHPjEpD5VCLYjShsN6veTuRadXmK2oRfhfA0yl7M0qVz4xmN3opd5ZHqfh BZbqg2Pjo03H36epu/INFK4sHnIsasF4Xoi1l/73T5XUOSMc4xRwCOLCO+AhvX9kubbW kkYGGwvN6rMr32K+LlBKCdMg0HdqK2PJbF2ZwF3u3cQRlJEfaBKOa5EILF0P4DKMhDdd +Tv6ElsbIVqMCf2UBulQWApogU5B22VZ+HsnPUhLfPIPVS3ppZgI9kEpSBbpU43oBKLy RyTA== MIME-Version: 1.0 Received: by 10.68.211.135 with SMTP id nc7mr18233000pbc.113.1333745885302; Fri, 06 Apr 2012 13:58:05 -0700 (PDT) Received: by 10.68.55.161 with HTTP; Fri, 6 Apr 2012 13:58:05 -0700 (PDT) In-Reply-To: References: Date: Fri, 6 Apr 2012 16:58:05 -0400 Message-ID: Subject: Re: [lang] SerializationUtils and generics From: Gary Gregory To: Commons Developers List Content-Type: multipart/alternative; boundary=e89a8ff1c378b6cdec04bd08e9f5 --e89a8ff1c378b6cdec04bd08e9f5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Apr 6, 2012 at 12:44 PM, sebb wrote: > On 5 April 2012 16:38, J=C3=B6rg Schaible w= rote: > > Hi Gary, > > > > Gary Gregory wrote: > > > >> Hi All: > >> > >> I'd like to propose the change below. This lets you get rid of type > casts > >> in call sites. You'll still get a ClassCastException if you code it > wrong > >> of course. > > > > +1 > > > >> The compiler warning you'll get is valid, so do not think we should > >> @SuppressWarning against it. > > > > Suppress it. It is only for us devs and it simply means that we know th= e > > risk and we accept it. > > If we do add @SuppressWarning, the reason for doing so must be > documented in the code. > And the method Javadoc should warn about any Exception that might be > generated. > Please see trunk for some fresh comments. Thank you, Gary > > > - J=C3=B6rg > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > > For additional commands, e-mail: dev-help@commons.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --=20 E-Mail: garydgregory@gmail.com | ggregory@apache.org JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 Spring Batch in Action: http://bit.ly/bqpbCK Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --e89a8ff1c378b6cdec04bd08e9f5--