Proposal: Automatic Resource Management
Mark Mahieu
mark at twistedbanana.demon.co.uk
Sun Mar 1 01:54:33 PST 2009
On 28 Feb 2009, at 19:08, Joshua Bloch wrote:
> Neal,
>
> On Sat, Feb 28, 2009 at 7:41 AM, Neal Gafter <neal at gafter.com> wrote:
>
>> Josh-
>>
>> The compatibility section must document incompatibilities, whether or
>> not you judge them likely to cause problems in practice.
>
>
> Good point. I will add this one. And I am still interested in
> whether
> anyone can find some code in an existing codebase that tickles this.
>
Josh,
The worst case I've turned up so far is the following, which would
not be broken by your proposal, but I think it would be restricted in
its ability to take advantage of it without further changes downstream:
http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/
javadoc/org/apache/openjpa/datacache/DataCacheManagerImpl.html
Here, the class DataCacheManagerImpl implements two interfaces, both
of which could logically be retrofitted with Disposable<X>, but doing
so would then break DataCacheManagerImpl since different type
arguments would be needed (Exception and RuntimeException).
(I think the idea is that an alternative implementation of
DataCacheManager can be specified by the user of this library; it
seems quite likely that these would extend the default
DataCacheManagerImpl implementation.)
Depends on how ticklish you are I guess. For me it's a hint that an
interface may not be the best mechanism.
Regards,
Mark
More information about the coin-dev
mailing list