Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBD8EDF93 for ; Wed, 31 Oct 2012 16:24:34 +0000 (UTC) Received: (qmail 87232 invoked by uid 500); 31 Oct 2012 16:24:33 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 87036 invoked by uid 500); 31 Oct 2012 16:24:33 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 87023 invoked by uid 99); 31 Oct 2012 16:24:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 16:24:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of greg.d.thomas@gmail.com designates 209.85.212.43 as permitted sender) Received: from [209.85.212.43] (HELO mail-vb0-f43.google.com) (209.85.212.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 16:24:26 +0000 Received: by mail-vb0-f43.google.com with SMTP id fq11so2156552vbb.30 for ; Wed, 31 Oct 2012 09:24: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=0SvDmxqz9OKsVILe7rOOCaVhV3h33laIvrfn0AH9j8I=; b=opz2VPHE2tycK7yv+5AHZ/syjOF6QPb3j2fnPrAOjtPjgpHewYRLq+LX/fK4/74wpO yz6nHPkkx/4ChaMyjrSWYQl4/IW+S41iZTWvx70rWrOlcKm1gPZaVc20cjWVmloaBlmK MOpCl0OCDCBxMLbhKic1pvBNNKnrvzf02/4ULDgVjzZI+swZRGHWm7hTJwtRMgVHoloq re5ordooOjZ4ewSM3zW/Oxl4uQqFi1EMCb/BYMgWdIvL0PKxOlq/jATAiskvMnJbIMOW 2uH1MpbO/BleqIdu19DP94WFqDF5jB6CNSdj3INTyQfaI8z3mG2lnuuTd2k5FYSUozHF TCNw== MIME-Version: 1.0 Received: by 10.52.90.2 with SMTP id bs2mr47000060vdb.23.1351700645026; Wed, 31 Oct 2012 09:24:05 -0700 (PDT) Received: by 10.58.67.197 with HTTP; Wed, 31 Oct 2012 09:24:05 -0700 (PDT) In-Reply-To: <50914ED9.2070008@cisco.com> References: <50914919.7020209@cisco.com> <50914ED9.2070008@cisco.com> Date: Wed, 31 Oct 2012 16:24:05 +0000 Message-ID: Subject: Re: [configuration] Re: CompositeConfiguration Checking Existence of Properties. From: Greg Thomas To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 31 October 2012 16:16, Dennis Putnam wrote: > Thanks for the reply. I had 'getString' originally and got the same error So just to confirm, String foo = config.getString(keythatexists); String bar = config.getString(keythatdoesnotexist); is throwing a NullPointerException on the second line? If so, that sounds like a bug as it should only throw a NoSuchElementException - and that only if setThrowExceptionOnMissing(true) is called. Greg --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org