Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 83847 invoked from network); 29 Apr 2005 08:17:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2005 08:17:49 -0000 Received: (qmail 46604 invoked by uid 500); 29 Apr 2005 08:18:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 46531 invoked by uid 500); 29 Apr 2005 08:18:56 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 46469 invoked by uid 99); 29 Apr 2005 08:18:55 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from brmea-mail-4.Sun.COM (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 29 Apr 2005 01:18:52 -0700 Received: from phys-epost-1 ([129.159.136.14]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j3T8HVi7017687 for ; Fri, 29 Apr 2005 02:17:32 -0600 (MDT) Received: from conversion-daemon.epost-mail1.sweden.sun.com by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IFP00H01845US@epost-mail1.sweden.sun.com> (original mail from Oyvind.Bakksjo@Sun.COM) for derby-dev@db.apache.org; Fri, 29 Apr 2005 10:17:31 +0200 (MEST) Received: from [129.159.112.222] (atum22.Norway.Sun.COM [129.159.112.222]) by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0IFP00DLD8D79L@epost-mail1.sweden.sun.com> for derby-dev@db.apache.org; Fri, 29 Apr 2005 10:17:31 +0200 (MEST) Date: Fri, 29 Apr 2005 10:17:31 +0200 From: Oyvind.Bakksjo@Sun.COM Subject: Re: [jira] Commented: (DERBY-214) Remove System.exit() calls from the DB2jServerImpl.java In-reply-to: <4271BBD1.4080001@apache.org> To: Derby Development Message-id: <4271ED9B.1060405@sun.com> Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: en, no, ru User-Agent: Mozilla/5.0 (X11; U; Linux i686; nb-NO; rv:1.7) Gecko/20040618 References: <124244851.1114624173884.JavaMail.jira@ajax.apache.org> <42707488.4060107@sbcglobal.net> <4270E3CF.5050204@sun.com> <4270E927.9020107@sbcglobal.net> <4270F0A1.2070608@apache.org> <4270FA03.1010802@sun.com> <4270FE2C.1070309@apache.org> <427160E8.4020208@sun.com> <42718B33.5050600@apache.org> <4271BA76.5020506@sun.com> <4271BBD1.4080001@apache.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jeremy Boynes skrev: > What I don't like with the arg array is the lack of context and type > safety. > > For example, I find > > cmd.execute(new String[]{"-p", "1567", "-h", "localhost" }) > > less meaningful than > > cmd.setPort(1567); > cmd.setHost("localhost"); > cmd.execute(); > > and probably harder to implement when you add in error checking. I totally agree with you. Also, if you write cmd.setProt(1567); cmd.setHots("localhost"); cmd.execute(); you will get an error at compile time, whereas if you write cmd.execute(new String[] { "-P", "1567", "-H", "localhost" }); the best you can hope for is an exception at runtime. -- �yvind Bakksj� Sun Microsystems, Web Services, Database Technology Group Haakon VII gt. 7b, N-7485 Trondheim, Norway Tel: x43419 / +47 73842119, Fax: +47 73842101