lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Treffer (JIRA) <>
Subject [jira] Commented: (LUCENE-2799) MMapDirectory not designed for inheritance
Date Sat, 04 Dec 2010 22:35:11 GMT


René Treffer commented on LUCENE-2799:

Ah, right, but FileSwitchDirectory won't solve my problems either as every file is in a different
directory. A set of MMapDirectories + delegation might help here.

But it would still be nice if MMapDirectory would either be final or extension safe. Or if
the implicit no-exension policy of openInput would be made explicit with a final tag.

> MMapDirectory not designed for inheritance
> ------------------------------------------
>                 Key: LUCENE-2799
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 3.0.3
>            Reporter: René Treffer
> How to reproduce
> Try to inherit from MMapDirectory to change the openInput logic (open files from different
> Expected result:
> Inherit from MMapDirectory, overwrite the one method, done.
> Actual result:
> It's impossible to overwrite the method as the inner classes would be missing. It's impossible
to fork the inner classes as they depend on a final method with default visibility (cleanMapping).
> It turns out to be the easiest option to completely for the code and replace just the
method in question.
> Possible fix:
> Change the visibility of most members and subtypes to be at least protected and avoid
the default visibility.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message