Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 46363 invoked from network); 3 Jun 2009 15:15:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 15:15:27 -0000 Received: (qmail 43298 invoked by uid 500); 3 Jun 2009 15:15:38 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 43257 invoked by uid 500); 3 Jun 2009 15:15:38 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 43247 invoked by uid 99); 3 Jun 2009 15:15:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 15:15:38 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.190] (HELO moutng.kundenserver.de) (212.227.126.190) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 15:15:28 +0000 Received: from [212.227.126.200] (helo=mrvnet.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1MBsBG-0001ho-00 for dev@struts.apache.org; Wed, 03 Jun 2009 17:15:06 +0200 Received: from [172.23.1.76] (helo=winxedgeeu01.exchange.xchg) by mrvnet.kundenserver.de with esmtp (Exim 3.35 #1) id 1MBsBG-0006R3-06 for dev@struts.apache.org; Wed, 03 Jun 2009 17:15:06 +0200 Received: from winxhubeu04.exchange.xchg (172.23.1.66) by winxedgeeu01.exchange.xchg (172.23.1.76) with Microsoft SMTP Server (TLS) id 8.1.358.0; Wed, 3 Jun 2009 17:15:11 +0200 Received: from winxbeuk02.exchange.xchg ([172.23.1.121]) by winxhubeu04.exchange.xchg ([172.23.1.66]) with mapi; Wed, 3 Jun 2009 17:15:05 +0200 From: Al Sutton To: Struts Developers List Date: Wed, 3 Jun 2009 17:14:58 +0200 Subject: RE: use of private final vs. protected Thread-Topic: use of private final vs. protected Thread-Index: AcnkXGK7tfMqcqIsQoqd25hJdxHRUQAASFgA Message-ID: <1E25C60A0E3FEB4C90EB67EFD4691ADD12161537@winxbeuk02.exchange.xchg> References: In-Reply-To: Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, de-DE x-provags-id: V02::hvTVreGe3yJGmt1eto5hT6X/rdKzOM4FUnpBZ2JzPQYuw 7BAsPkYi+asGD1OwyrnzisU892aD+HU7qi4WD3Y4VAIcROafjt s6trSf3azJm4vm/nVXjxNJmMiuZokQ4Txnft/WXYcq2fjAU6V7 trA+KMuZbJtpYpFD4VoGwYDs3tBRo0Zv9pRw44xyVYsh8DL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Provags-ID: kundenserver.de abuse@kundenserver.de ident:@172.23.1.76 X-Virus-Checked: Checked by ClamAV on apache.org Back in the dim and distant past I remember final being used to give the JI= T an optimization hint that whatever's described as final can be inlined as= it won't change (note JIT not compiler). It's not a big saving, but in tig= ht loops and heavily called code it can all add up. I found http://www.javaperformancetuning.com/tips/final.shtml which expands= on it a bit. Al. --=20 * Written an Android App? - List it at http://andappstore.com/ * =3D=3D=3D=3D=3D=3D Funky Android Limited is registered in England & Wales with the company number=A0 6741909. The registered head office is Kemp House, 152-160 City Road, London,=A0 EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -----Original Message----- From: Wes Wannemacher [mailto:wesw@wantii.com]=20 Sent: 03 June 2009 16:02 To: Struts Developers List Subject: use of private final vs. protected I am looking at subclassing JakartaMultiPartRequest and almost all of the members are 'private final', but they are Lists and Maps, so I am curious what the justification is... I want to subclass and get at the data, obviously I'd have to change the declarations to protected, but is final necessary? From what I can see, the only thing it guarantees is that with each instance of JakartaMultiPartRequest, the Lists or Maps will point to new instances. I guess what I'm wondering is if there is an intention to follow a coding standard or something that I'm missing because I don't see much point for these members to be private or final (especially since it makes it pretty much impossible for me to subclass it). -Wes --=20 Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org