[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More finalize woes

From: Dalibor Topic
Subject: Re: More finalize woes
Date: Tue, 4 Mar 2003 07:23:09 -0800 (PST)

Hi Jeroen,

--- Jeroen Frijters <address@hidden> wrote:
> Hi,
> Classpath's has a
> finalize, but Java API
> docs say it shouldn't have it.

it's commented out, and should be removed from
classpath completely, in my opinion, just like the
close method. they are already implemented in
FilteredOutputStream (or should be, according to the

>[De|In]flater both have an empty
> finalize method "for
> compatibility". Is this really necessary?

Yes, in order to have reflection on these methods
working. A pretty good reason in my opinion.

Beside, the finalize method in classpath's Deflater is
broken. It should call end() as the 1.4 spec demands,
instead of tweaking it for optimization purposes.

The optimization breaks code when you extend Deflater
for your own native implementation which relies on
finalize calling its end() to cleanup native

The analoguous case can be make for Inflater.

BTW, deprecating end() before it's deprecated in the
spec is a minor glitch that could be fixed in the same
swoop ;)

dalibor topic

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more

reply via email to

[Prev in Thread] Current Thread [Next in Thread]