https://issues.apache.org/ooo/show_bug.cgi?id=123862
Bug ID: 123862 Issue Type: ENHANCEMENT Summary: O*String's isEmpty() should be used instead of its older alternatives Product: General Version: 4.1.0-dev Hardware: All OS: All Status: CONFIRMED Severity: normal Priority: P4 Component: code Assignee: issues@openoffice.apache.org Reporter: h...@apache.org CC: issues@openoffice.apache.org In our current codebase there are all kinds of variants for checking whether a string is empty: aString == OUString() aString.equalsAscii("") aString.equals( OUString()) aString.compareTo( OUString("")) aString.compareToAscii( "") aString.getLength() == 0 aString.getLength() < 1 and the related checks to check whether it is not empty: aString.getLength() > 0 aString.getLength() >= 1 The O*String method isEmpty() allows cleaner code and is as fast or faster than all its alternatives, so this method should be used. -- 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.