Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 15547 invoked by uid 500); 19 Mar 2003 14:43:16 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 15491 invoked from network); 19 Mar 2003 14:43:16 -0000 Received: from office.oilspace.com (213.219.58.70) by daedalus.apache.org with SMTP; 19 Mar 2003 14:43:16 -0000 Received: from kpiroumian (ns.informtek.com.ru [195.239.59.130]) by office.oilspace.com (Postfix) with SMTP id 3DDE3F7 for ; Wed, 19 Mar 2003 14:43:15 +0000 (GMT) Message-ID: <001d01c2ee25$e0dd37f0$a52efea9@kpiroumian> From: "Konstantin Piroumian" To: References: <20030319142638.GA14537@expresso.localdomain> Subject: Re: Strengthening setup() contract Date: Wed, 19 Mar 2003 17:43:16 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: "Jeff Turner" > Hi, > > Generator, Reader and Transformer all inherit from > SitemapModelComponent, which declares the setup() method: > > public interface SitemapModelComponent extends Component { > /** > * Set the SourceResolver, objectModel > * Map, the source and sitemap Parameters > * used to process the request. > */ > void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) > throws ProcessingException, SAXException, IOException; > } > > If there's no objections, I would like to: > - assert in the Javadoc that 'src' will never be null > - modify AbstractProcessingPipeline to ensure this, and throw meaningful > exceptions otherwise. E.g. I18nTransformer does not require 'src' attribute. -- Konstantin > > Currently, leaving out the 'src' attribute causes a typically unhelpful > Cocoon error message: > > java.net.MalformedURLException: Invalid System ID > > Strengthening this contract should at least improve the error message. > > > --Jeff > >