[Hippo-cms7-user] file:// protocol in source code
Bart van der Schans
b.vanderschans at onehippo.com
Wed Jun 6 11:22:57 CEST 2012
Thanks for your feedback!
On Wed, Jun 6, 2012 at 10:25 AM, David Martin <dmartin at ippon.fr> wrote:
> My first point is why is there sometimes up to three possible file protocol
> configurations to describe a file system path ? (file:, file:/ and file://)
Yes, there's some legacy compatibility issues here. I'm not sure if we
can drop the support.
> My second point is code duplication. An utility class can help managing file
> protocol related needs, perhaps.
> My third point is magic numbers (used in substring() methods). An utility
> class may hide these (and use .length() instead of them)
Yep, Although the "magic" part is in the line above in these cases.
> My last (and least) point is "file://" string hardcoded. It cound be nice to
> have a single reference to this string somewhere.
> It's not a high priority thing (since everything works : that's not a
> blocking issue) but as I was working on it, I though it can help to mention
> it in a detailed email.
Yes, these things do help! The code has grown over time and I guess
it's time to tidy up this part a bit ;-)
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
More information about the Hippo-cms7-user