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 8A8F174DB for ; Thu, 8 Sep 2011 13:42:24 +0000 (UTC) Received: (qmail 28438 invoked by uid 500); 8 Sep 2011 13:42:23 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 28155 invoked by uid 500); 8 Sep 2011 13:42:22 -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 28147 invoked by uid 99); 8 Sep 2011 13:42:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 13:42:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,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.218.43 as permitted sender) Received: from [209.85.218.43] (HELO mail-yi0-f43.google.com) (209.85.218.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 13:42:15 +0000 Received: by yia27 with SMTP id 27so866335yia.30 for ; Thu, 08 Sep 2011 06:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AvEmr2DctT+PPmG1EzChcV3/Iz8tgbDol+7oSHOXQ0g=; b=L+pUiY18cQvADkq5evGpB+XQB/sOTA6xNKsrblI9zyhEBUNCS3W4BWd6+KSzB+ljji kS/zC2jN6Gd6vdkCGgkZ5hYgDcNiBzZyPAGMccXpNGRdoLcZqJpNtvG1FzlXyupioCsg EVJMQ2fi+8NxIKQBRXiWqXIIffKB6o0v4qp0Y= MIME-Version: 1.0 Received: by 10.231.0.221 with SMTP id 29mr578766ibc.56.1315489314146; Thu, 08 Sep 2011 06:41:54 -0700 (PDT) Received: by 10.231.33.198 with HTTP; Thu, 8 Sep 2011 06:41:54 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Sep 2011 09:41:54 -0400 Message-ID: Subject: Re: [lang] Better Validate.isInstance messages From: Gary Gregory To: Commons Developers List Content-Type: multipart/alternative; boundary=00151773d3d246881c04ac6e39ef X-Virus-Checked: Checked by ClamAV on apache.org --00151773d3d246881c04ac6e39ef Content-Type: text/plain; charset=UTF-8 Now in SVN :) Gary On Thu, Sep 8, 2011 at 2:22 AM, Henri Yandell wrote: > +1 :) > > On Wed, Sep 7, 2011 at 12:54 PM, Gary Gregory > wrote: > > On Wed, Sep 7, 2011 at 2:42 PM, sebb wrote: > > > >> On 7 September 2011 19:26, Gary Gregory wrote: > >> > Hi All: > >> > > >> > The message for the exception thrown by Validate.isInstance does not > >> mention > >> > the actual type, only the expected type. > >> > > >> > Is there any objection to changing this? > >> > > >> > trunk: "The validated object is not an instance of %s" > >> > > >> > Proposal (1): "The validated object is expected to be an instance of > %s, > >> not > >> > a %s" > >> > > >> > Or more succinctly (2): "Expected an instance of %s, got a %" > >> > > >> > Or more succinctly (3), a la JUnit: "Expected: %s, actual: %" > >> > > >> > Thoughts? > >> > >> (3) seems fine. > >> > > > > Here are examples of what I have in my local sandbox (not in SVN yet): > > > > - isAssignableFrom: "Cannot assign a java.lang.String to a java.util.List > > - isInstance: "Expected type: java.util.List, actual: java.lang.String" > > > > Tracking here: https://issues.apache.org/jira/browse/LANG-751 > > > > Gary > > > > > >> > >> > Gary > >> > > >> > > >> > -- > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org > >> > JUnit in Action, 2nd Ed: http://s.apache.org/rl > >> > Spring Batch in Action: http://s.apache.org/HOq > >> > Blog: http://garygregory.wordpress.com > >> > Home: http://garygregory.com/ > >> > Tweet! http://twitter.com/GaryGregory > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > >> For additional commands, e-mail: dev-help@commons.apache.org > >> > >> > > > > > > -- > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > JUnit in Action, 2nd Ed: http://s.apache.org/rl > > Spring Batch in Action: http://s.apache.org/HOq > > Blog: http://garygregory.wordpress.com > > Home: http://garygregory.com/ > > Tweet! http://twitter.com/GaryGregory > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > -- E-Mail: garydgregory@gmail.com | ggregory@apache.org JUnit in Action, 2nd Ed: http://s.apache.org/rl Spring Batch in Action: http://s.apache.org/HOq Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --00151773d3d246881c04ac6e39ef--