Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 46851 invoked from network); 1 Oct 2007 20:03:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2007 20:03:10 -0000 Received: (qmail 12404 invoked by uid 500); 1 Oct 2007 20:02:50 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 12374 invoked by uid 500); 1 Oct 2007 20:02:50 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 12363 invoked by uid 99); 1 Oct 2007 20:02:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 13:02:50 -0700 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.157.241.82] (HELO lomwsm03.mwlo.mailwatch.com) (216.157.241.82) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 20:02:49 +0000 Received: from lomwsc01.mwlo.mailwatch.com (lomw-smout-vip.mwlo.mailwatch.com [216.157.241.105]) by lomwsm03.mwlo.mailwatch.com (8.13.8/8.13.8/SuSE Linux 0.8) with ESMTP id l91K1OJA029948 for ; Mon, 1 Oct 2007 16:01:27 -0400 Received: from mail pickup service by lomwsc01.mwlo.mailwatch.com with Microsoft SMTPSVC; Mon, 1 Oct 2007 16:01:24 -0400 Received: from 216.157.241.100 ([216.157.241.100]) by lomwsc01.mwlo.mailwatch.com with SMTP id 000300019374676d-6caa-4157-84d8-cdde59b30f5f; Mon, 01 Oct 2007 16:01:24 -0400 Received: from fmpo2.azell.com (fmpo2.azell.com [136.1.7.13]) by lomwsm39.mwlo.mailwatch.com (8.13.5/8.13.5) with ESMTP id l91KBAdQ018527 for ; Mon, 1 Oct 2007 16:11:10 -0400 Received: from fbbfcs52.dearborn.ford.com ([19.99.2.38]) by fmpo2.azell.com (MOS 3.7.3a-GA) with ESMTP id BPZ16870; Mon, 1 Oct 2007 20:01:24 GMT Received: from fbbfcb01.Dearborn.ford.com ([19.59.152.45]) by fbbfcs52.dearborn.ford.com with Microsoft SMTPSVC(6.0.3790.2499); Mon, 1 Oct 2007 16:01:24 -0400 Received: from na1ecb01.Dearborn.ford.com ([19.5.152.72]) by fbbfcb01.Dearborn.ford.com with Microsoft SMTPSVC(6.0.3790.2499); Mon, 1 Oct 2007 16:01:23 -0400 Received: from na1fcm10.dearborn.ford.com ([19.59.152.39]) by na1ecb01.Dearborn.ford.com with Microsoft SMTPSVC(6.0.3790.2499); Mon, 1 Oct 2007 16:01:23 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: A try catch and return question Date: Mon, 1 Oct 2007 16:01:23 -0400 Message-ID: In-Reply-To: <4952B1779A19A94F8A5D2F96B64624DA3CE1ED@C3EXCHANGE.corp.premierinc.com> Thread-Topic: A try catch and return question Thread-Index: AcgCDObXIrsPAGY9QZe59TmWJIzpVACJKwbAAAztw7A= References: <235407.20770.qm@web56714.mail.re3.yahoo.com> <4952B1779A19A94F8A5D2F96B64624DA3CE1ED@C3EXCHANGE.corp.premierinc.com> From: "Zhang, Larry \(L.\)" To: "Struts Users Mailing List" X-OriginalArrivalTime: 01 Oct 2007 20:01:23.0944 (UTC) FILETIME=[D7D6B680:01C80465] X-MW-BTID: 103925000020072747267000004 X-MW-CTIME: 1191269470 X-MW-SENDING-MTA: 136.1.7.13 HOP-COUNT: 1 X-MAILWATCH-INSTANCEID: 010300019374676d-6caa-4157-84d8-cdde59b30f5f X-Virus-Checked: Checked by ClamAV on apache.org I have a method having the following structure: public Object myMethod() { try { // some code return theReturnedObject, }catch{ // some code } finally { // some code } } =20 Please let me know if the following version of code better than the above? public Object myMethod() { try { // some code =09 }catch{ // some code } finally { // some code } return theReturnedObject, } The only difference is that the bottom one put the return down to the bottom of the method and take the return out of the try. Please let me know. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org