https://bugs.freedesktop.org/show_bug.cgi?id=62096

          Priority: medium
            Bug ID: 62096
          Assignee: [email protected]
           Summary: Replace O(U)String compareTo with ==
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: unspecified
         Component: Libreoffice
           Product: LibreOffice

There are many uses of compareTo, like "str1.compareTo(str2) == 0" which can be
replaced with there better understandable equivalents "str1 == str2" or
"str1.equals(str2)".

Here are two grep statements to find some of them:

git grep '\.compareTo\s*([^)]*)\s*==\s\(0\|COMPARE_EQUAL\)'

-> lhs.Name.compareTo(rhs) == 0


git grep '\(0\|COMPARE_EQUAL\)\s*==\s*[a-zA-Z0-9]\+\.compareTo\s*([^)]*)'

-> 0 == url.compareTo( EXPAND_PROTOCOL ":" )

Those could be replaced with "str1 == str2". There are many other uses like
with != and more. If you need help to find them or to adapt the grep statements
please ask me!

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to