Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 18088 invoked from network); 6 Feb 2003 20:08:56 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 6 Feb 2003 20:08:56 -0000 Received: (qmail 12119 invoked by uid 97); 6 Feb 2003 20:10:28 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@nagoya.betaversion.org Received: (qmail 12112 invoked from network); 6 Feb 2003 20:10:27 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 6 Feb 2003 20:10:27 -0000 Received: (qmail 17834 invoked by uid 500); 6 Feb 2003 20:08:52 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 17807 invoked from network); 6 Feb 2003 20:08:50 -0000 Received: from nan-smtp-12.noos.net (HELO smtp.noos.fr) (212.198.2.83) by daedalus.apache.org with SMTP; 6 Feb 2003 20:08:50 -0000 Received: (qmail 32245490 invoked by uid 0); 6 Feb 2003 20:08:50 -0000 Received: from unknown (HELO apache.org) ([212.198.17.4]) (envelope-sender ) by 212.198.2.83 (qmail-ldap-1.03) with SMTP for ; 6 Feb 2003 20:08:50 -0000 Message-ID: <3E42C11A.9090900@apache.org> Date: Thu, 06 Feb 2003 21:10:02 +0100 From: Stephen McConnell User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en, en-us MIME-Version: 1.0 To: Avalon Developers List Subject: Re: [VOTE] LogKit LoggerListener API References: <001c01c2cdc5$8ad82e30$0801a8c0@Lagrange> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Leo Sutic wrote: > > >>From: Berin Loritsch [mailto:bloritsch@apache.org] >> >>void addLoggerListener( final LoggerListener listener ) >> throws java.util.TooManyListenersException() >>{ >> if ( null == m_loggerListener ) >> { >> m_loggerListener = listener; >> } >> else >> { >> throw new java.util.TooManyListenersException(); >> } >>} >> >> > > +1 > > > >>* Easy to do, does not change functionality >>* Clearer contract, although it forces client code to do exception >> handling for the listener. >>* No future API changes other than the removal of the declared >> >> >exception > >Will result in compilation errors. Given a: > >try { > x.addLoggerListener (this); >} catch (TooManyListenersException tmle) { > // Do nothing >} > >if addLoggerListener (this) doesn't throw a TooManyListenersException, >javac will complain that "TooManyListenersException not thrown in >corresponding try clause". > But the proposed implementation DOES declare and can potentially throw a TooManyListenersException. I don't get the issue here. I must be missing something (seems to be a habbit lately) - please explain. Cheers, Steve. -- Stephen J. McConnell mailto:mcconnell@apache.org http://www.osm.net --------------------------------------------------------------------- To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: avalon-dev-help@jakarta.apache.org