Bug 48870 - avoid parallel arrays of base types
Summary: avoid parallel arrays of base types
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: unspecified
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-08 06:55 UTC by Ralf Hauser
Modified: 2011-02-18 16:48 UTC (History)
0 users



Attachments
patch_parallelArrays.txt (11.30 KB, text/plain)
2010-03-08 06:55 UTC, Ralf Hauser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser 2010-03-08 06:55:57 UTC
Created attachment 25103 [details]
patch_parallelArrays.txt

having kind of 'synchronized' arrays, i.e. one of Strings and another one of Integers appears to be a questionable programming pattern to me.

Pls find attached a hopefully more OO approach

see also bug 48158
Comment 1 Ralf Hauser 2010-03-08 06:58:52 UTC
oops, the related RFE should have been Bug 48863
Comment 2 Christopher Schultz 2010-11-09 17:45:05 UTC
Ralf,

Why did you submit a patch with deprecated items in it? Instead of documenting the items to be deprecated, just go all the way with the enum.

Also, I'm not sure that BootLocation necessarily needs to implement CharSequence. I think it would be cleaner for BootLocation to simply contain a String (location) and enum type.

I don't happen to like the name BootLocation but that's just a matter of taste. Maybe RepositoryLocation?
Comment 3 Mark Thomas 2011-02-18 16:48:12 UTC
Fixed in trunk and will be in 7.0.9 onwards. Since I agree with Chris's views, the patch applied was along those lines.