RFR: 8050091: LinkedList has incorrect implementation comment
Ivan Gerasimov
ivan.gerasimov at oracle.com
Mon Jun 29 23:29:37 UTC 2015
Hi Martin!
I agree that since the commented code only contains an assert statement,
it's unlikely to be confused with a "real" method.
It is helpful to have the invariants documented, so yes, it looks good.
Sincerely yours,
Ivan
On 30.06.2015 0:56, Martin Buchholz wrote:
>
>
> On Mon, Jun 29, 2015 at 8:04 AM, Ivan Gerasimov
> <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote:
>
>
>
> On 27.06.2015 21:54, Martin Buchholz wrote:
>>
>>
>> On Sat, Jun 27, 2015 at 5:46 AM, Ivan Gerasimov
>> <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote:
>>
>> Hi Martin!
>>
>> Thank you for this cleanup!
>> Removal of wrong comments looks fine.
>>
>> But your webrev contains commented checkInvariants() method.
>> Is it a leftover from debugging or something?
>>
>>
>> It could be used for debugging, but it's primarily the
>> (corrected!) documentation of the invariants of the fields,
>> expressed in executable code.
>
> Ah, alright, thanks,
>
> A short comment would help avoid confusion, as currently it does
> look just like a commented out code :)
>
>
> Well, as something that lives in the nether world between code and
> comment, it *is* commented out code.
> I moved in your direction by renaming the not-quite-a-method to
> dataStructureInvariants.
More information about the core-libs-dev
mailing list