You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2014/02/01 13:52:02 UTC

[Bug 123862] O*String's isEmpty() should be used instead of its older alternatives

https://issues.apache.org/ooo/show_bug.cgi?id=123862

--- Comment #3 from hdu@apache.org <hd...@apache.org> ---
(In reply to hdu@apache.org from comment #2)
> (In reply to j.nitschke from comment #1)
> > How would you like negations formated?
> > a) !a.isEmpty()
> > b) ! a.isEmpty()
> > c) ( !a.isEmpty() )
> > d) ?
> 
> I personnaly prefer a.

To add to this: if the 'a' means something lengthy like
   getFoo()->getBar()->getMore()->getDetails()->getName()
then I actually prefer something like
   a.isEmpty() == false
to keep the logic close together so it is easier to read. Not using the
super-long and hardly debugable stuff would be even better, but for this
half-automatic fix we shouldn't change such innards.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.