On Wed, Jun 3, 2009 at 8:23 AM, Wes Wannemacher <w...@wantii.com> wrote:
> On Wed, Jun 3, 2009 at 11:14 AM, Al Sutton <a...@funkyandroid.com> wrote: > > Back in the dim and distant past I remember final being used to give the > JIT 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 > tight 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. > > > > > That makes sense, Al, but in cases like this (non-primitives) all it > does is finalize the reference. So the referred objects are not > immutable, and I guess I was just wondering whether the optimization > that final provides in this case is worth the pain it causes for > subclassing. > > I agree with Musachy, we should be careful using private and final, > especially in struts since we inject objects like this. I figured I > could subclass it, make some changes and then have the plugin define a > bean overriding the definition that comes from core. With the fields > defined the way they are, it's not possible. I'll make the changes to > JakartaMultiPartRequest, but wanted to make sure I wasn't breaking > some rule. > > Funny side-note... So I was reading all the JavaDocs on commons > file-upload and low-and-behold, who wrote most of the classes I was > looking at? Our own Martin Cooper! So, Martin, you wanna help out with > enhancing struts2 file uploading capabilities? 8-D Ha! Old code always comes back to haunt, no? ;-) Yep, I did a lot of work on that code a few years ago, partly in support of Struts 1 and partly in support of extensibility (which I never got around to documenting properly, but which worked like a charm). I handed the reins over, though, at about the time the streaming API came along. While I also did a lot of work on the S1 wrapper, I haven't even looked at the S2 wrapper, so I'm not sure you really want me messing with it. ;-) Still, if I can find some time lurking under a rock somewhere, I can try to keep tabs on what you're up to (assuming there's a "plan" of sorts). -- Martin Cooper -Wes > > > -- > 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-unsubscr...@struts.apache.org > For additional commands, e-mail: dev-h...@struts.apache.org > >