Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A3AA1200BF8 for ; Fri, 13 Jan 2017 17:34:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 97547160B3F; Fri, 13 Jan 2017 16:34:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DBEA3160B2E for ; Fri, 13 Jan 2017 17:34:12 +0100 (CET) Received: (qmail 31710 invoked by uid 500); 13 Jan 2017 16:32:09 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 31323 invoked by uid 99); 13 Jan 2017 16:32:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2017 16:32:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4A0F0C04BC for ; Fri, 13 Jan 2017 16:32:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.729 X-Spam-Level: * X-Spam-Status: No, score=1.729 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, KAM_ASCII_DIVIDERS=0.8, KAM_LIVE=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hMWOSCZ41E5N for ; Fri, 13 Jan 2017 16:32:07 +0000 (UTC) Received: from mail-qt0-f181.google.com (mail-qt0-f181.google.com [209.85.216.181]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 967DE5F2EF for ; Fri, 13 Jan 2017 16:32:06 +0000 (UTC) Received: by mail-qt0-f181.google.com with SMTP id l7so52200920qtd.1 for ; Fri, 13 Jan 2017 08:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=iHOYyCgJeNN9DtUmkZyuNBx2e3C5qlJiFVi5ZhnHIrA=; b=JSmbKsaP7bNQ/jsQXq/f7ZNUp7aH+sq3wYuBmYCDFLbM5n28pwmbnaBrGW5GUyj8dP +EY3rQI6aNPusbgdRjwOAu6RwqDlk3XOuwriJr/TCss3FCZrmYQYQnBOJFs8iXZl+E9N MNtY2HJMk0RZyolhkYT4AGavqR75DXXGt4VbSf1530T/cQO1pyGYrJmkVlW+u0/nqRqz 1wphZgzCvtFlXYWmbcMWfK9mMH6oY7sSQvcjcNTax7ti2/tarX47qKY5gT0bwYeBFPDD ltT2sGZA3LEcoye0MompZe0Ff21Zn2ZrX40x82fgLlUAPFAcf81HtxRxhK6oqIk7tgWG wggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=iHOYyCgJeNN9DtUmkZyuNBx2e3C5qlJiFVi5ZhnHIrA=; b=Q1UPMQLhOC/sqGrswtQT7yebfWbTkRQgfvZ8sNKW3yoX+MbV3acIvUfO6M09bAl7i0 beST+CCUrl2Eg5ASuLnf3R8V3Zf3GFdcKQHK8trBQ7gxjAorzLUf/vIARuJkDUdA3Sip 9ALg+7p3qKWgNfz1ujXK9FTxMh2rZ5804n+gZxbI9K35RDwJ2TlUh6g8xlsb6En2KlkL U4QqOcJr1Ee5fCXeYsgXUWDTIlNL/e6+5cS0BunwHIfEDQ1p583/Y8rzVwjAy9cIWZZY aU3Haf/+KimeCjq/Zhpuy++o5koqedizwChtzSKxAxz5P9uVn7Bwm4zXH0R57Od/HAf0 GOmQ== X-Gm-Message-State: AIkVDXKOQ5Tpanu1wwIOPz9gBR3JV5R3bvjFClx47vCC4iPLn/firjCSk+xROJrXx6q01A== X-Received: by 10.200.2.76 with SMTP id o12mr19252853qtg.181.1484325125476; Fri, 13 Jan 2017 08:32:05 -0800 (PST) Received: from [192.168.2.150] (c-73-191-41-186.hsd1.va.comcast.net. [73.191.41.186]) by smtp.googlemail.com with ESMTPSA id e42sm704522qte.20.2017.01.13.08.32.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 08:32:05 -0800 (PST) Subject: Re: [Qpid JMS 0.11.1] Nullpointer exception when providing an empty string to the ConnectionFactory To: users@qpid.apache.org References: From: Timothy Bish Message-ID: <7c88001b-556a-fba2-0653-2f7cefb7b49f@gmail.com> Date: Fri, 13 Jan 2017 11:32:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit archived-at: Fri, 13 Jan 2017 16:34:13 -0000 On 01/13/2017 10:08 AM, Adel Boutros wrote: > Hello Tim, > > > I took a look on the master brunch of the github repo and indeed it seems to be fixed. > > > Regards, > > Adel I made some additional changes to make the error reporting more consistent. > > ________________________________ > From: Timothy Bish > Sent: Friday, January 13, 2017 3:30:59 PM > To: users@qpid.apache.org > Subject: Re: [Qpid JMS 0.11.1] Nullpointer exception when providing an empty string to the ConnectionFactory > > On 01/13/2017 08:41 AM, Adel Boutros wrote: >> Hello, >> >> >> While playing around with the JMS API, we noticed that if an empty string is passed to the JmsConnectionFactory constructor, it will throw back a NullPointerException because it tries to access the ".toString" of a NULL URL (See createURI). >> >> >> Do you agree that it would be better to throw an exception which clearly says an empty String URL is forbidden? If yes, I will add a jira issue for it. >> >> >> public static void main(String[] args) { >> new JmsConnectionFactory(""); >> } >> >> >> Output >> >> ------------ >> >> Exception in thread "main" java.lang.NullPointerException >> at org.apache.qpid.jms.JmsConnectionFactory.(JmsConnectionFactory.java:115) >> at org.apache.qpid.jms.JmsConnectionFactory.(JmsConnectionFactory.java:111) >> >> >> Regards, >> >> Adel >> > I will take a look at the code again, some things were fixed recently in > QPIDJMS-245 but there's probably a few more defensive checks needed to > keep people from hitting this. > > > -- > Tim Bish > twitter: @tabish121 > blog: http://timbish.blogspot.com/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > For additional commands, e-mail: users-help@qpid.apache.org > > -- Tim Bish twitter: @tabish121 blog: http://timbish.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org