Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 79727 invoked from network); 31 Jul 2007 01:10:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2007 01:10:30 -0000 Received: (qmail 34475 invoked by uid 500); 31 Jul 2007 01:10:30 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 34277 invoked by uid 500); 31 Jul 2007 01:10:30 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 34268 invoked by uid 99); 31 Jul 2007 01:10:30 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 18:10:30 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.79.194.121] (HELO mesa2.com) (64.79.194.121) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 01:10:17 +0000 Received: from [24.91.115.45] (account jdkulp HELO dilbert.boston.amer.iona.com) by mesa2.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 1154566; Mon, 30 Jul 2007 21:09:52 -0400 From: Daniel Kulp Reply-To: dkulp@apache.org To: cxf-dev@incubator.apache.org Subject: Re: svn commit: r561135 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/headers/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ systests/ systests/src/test/jav... Date: Mon, 30 Jul 2007 21:09:51 -0400 User-Agent: KMail/1.9.5 Cc: Glen Mazza References: <20070730213524.B122C1A981A@eris.apache.org> <1185840767.10713.23.camel@gmazza-desktop> In-Reply-To: <1185840767.10713.23.camel@gmazza-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707302109.51740.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Glen, Hmm... just realized I spelled your name wrong in my commit. I apologize for that. On Monday 30 July 2007 20:12, Glen Mazza wrote: > Can we make the Direction enum above public, so it can be used > externally--that way, we would not need to define DIRECTION_IN, _OUT, > _INOUT static integers at the top? (Or is it that the callee can not > work with enums--if so, can we just work with the static ints then?) > Having both enum constants and static integers with the same name is a > little bit confusing, if we could just work with one of the two I > think that would be better. Agreed. I just took care of that. > > + public void handleMessage(SoapMessage message) throws Fault { > > + // TODO Auto-generated method stub > > + Iterator
iter = message.getHeaders().iterator(); > > (I don't know the code here. Is there any chance the iterator above > could be null -- i.e., if there are no headers? If so, the above line > of code will NPE.) No. SoapMessage.getHeaders() creates a new list if one isn't yet present. > > + public KeystorePasswordCallback() { > > + passwords.put("Alice", "abcd!1234"); > > + passwords.put("alice", "abcd!1234"); > > + passwords.put("Bob", "abcd!1234"); > > + passwords.put("bob", "abcd!1234"); > > + } > > + > > What is the point of adding both Alice and alice here? Bob and bob? > If you're trying to make user entry case-insensitive (not really > necessary IMHO), I don't think that will work, because people could > still enter "BOB", "bOB", etc., and the above would fail anyway. I'll let Ulhas or Fred comment on this. I have no idea. > > + public static void main(String[] args) { > > + try { > > + Server s = new Server(); > > + s.start(); > > + } catch (Exception ex) { > > + ex.printStackTrace(); > > + System.exit(-1); > > + } finally { > > + System.out.println("done!"); > > + } > > + } > > I think this needs fixing. The purpose of the finally is "run this > code whether or not there was an exception", but that is circumvented > with the System.exit(-1) in the catch {} block. I think either the > System.exit(-1) line has to be removed, or the finally block removed, > with its single statement placed at the end of the try{} block. Hmm... very good point. That said, I think a TON of our system tests probably have the same problem. I'm willing to bet this is a copy/paste from one of the others. :-( I suppose I could argue that there are throwables that aren't exceptions that could invoke the finally (like OutOfMemoryErrors and the like), but I'd really just be stretching for an excuse. -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 daniel.kulp@iona.com http://www.dankulp.com/blog