hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Writes to AbstractContentEncoder.completed field
Date Mon, 17 Jun 2013 16:59:44 GMT
On 17 June 2013 17:24, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Mon, 2013-06-17 at 14:52 +0100, sebb wrote:
>> At present, the classes ChunkEncoder and LengthDelimitedEncoder both
>> use the code
>>
>> this.completed = true;
>>
>> This is equivalent to super.complete(); these are the only remaining
>> external acceses to the field.
>>
>> Any objections to making that change?
>>
>> The completed field can then be deprecated so accidental external
>> access will be flagged.
>>
>> One day we can make it private, which will stop completed from ever
>> being reset back to false (which I assume would cause some problems!)
>
> This will probably help make FindBugs reports look prettier but will
> hardly make a difference unless we make a decision to stop using direct
> access to protected variables consistently across the code base.

I think it will help slightly because the compiler will warn about access.
So at least usages within the HC codebase will be flagged and can be
resolved, even if external code can still bypass the access methods.
If external code ignores the deprecation then it suffers any consequences ...

> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message