[
https://issues.apache.org/jira/browse/GEODE-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017706#comment-16017706
]
ASF subversion and git services commented on GEODE-1994:
--------------------------------------------------------
Commit d16d192b22f2932ac95780f18e92f0aece730240 in geode's branch
refs/heads/develop from [~prhomberg]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=d16d192 ]
GEODE-1994: Overhaul of internal.lang.StringUtils to extend and heavily use
commons.lang.StringUtils
* geode.internal.lang.StringUtils has been deprecated. In the interim, it
has been heavily refactored and extends commons.lang.StringUtils.
*
* Renamed:
* -- EMPTY_STRING -> EMPTY (inherited)
* -- toUpperCase -> upperCase (inherited)
* -- toLowerCase -> lowerCase (inherited)
* -- padEnding -> rightPad (inherited)
*
* Removed:
* -- EMPTY_STRING_ARRAY; usage replaced with
commons.lang.ArrayUtils.EMPTY_STRING_ARRAY
* -- SPACES
* -- UTF_8; rare usage replaced with raw string
* -- concat; usage replaced with commons.lang.join, refactoring as necessary.
* -- getLettersOnly
* -- getSpaces
* -- truncate
* -- valueOf; usage refactored to use defaultString
*
* Refactored
* -- defaultIfBlank: previously relied on varargs and could return null.
Usage refactored to allow inheritance from commons.
* -- defaultString(s, EMPTY) refactored to use standard signature
defaultString(s) for consistency throughout codebase.
* -- isBlank: usage refactored to resolve discrepancies with
commons.lang.isBlank, which is now inherited.
* -- isEmpty: usage refactored to resolve discrepancies with
commons.lang.isEmpty, which is now inherited.
*
* Code Cleanup:
* -- Many uses of !isBlank -> isNotBlank
* -- Changes suggested by Inspections on most touched files.
* -- Explicit <T> -> <> when type is inferable
* -- while loops operating on iterators converted to for each loops
* -- for loops operating on array indices converted to for each loops
* -- Various string typos corrected.
* -- isEmpty(s.trim()) -> isBlank(s)
* -- s.trim().isEmpty() -> isEmpty(s)
* -- Removed some instances of 'dead' code
* -- Optimized imports in every touched file
*
* Qualitative Changes:
* -- The following functions now throw an error when called with a null
string input:
* -- * LocatorLauncher.Builder.setMemberName
* -- * ServerLauncher.Builder.setMemberName
* -- * ServerLauncher.Builder.setHostnameForClients
* -- (Unit tests added to capture these changes)
*
* Notes:
* -- StringUtils.wraps may be inherited from Apache Commons when the
dependency is updated.
* -- AbstractLauncher.getMember has the documented behavior of returning
null when both MemberName and ID are blank. Is this the best behavior for this
method?
* this closes #521
> Change geode StringUtils to extend commons StringUtils
> ------------------------------------------------------
>
> Key: GEODE-1994
> URL: https://issues.apache.org/jira/browse/GEODE-1994
> Project: Geode
> Issue Type: Wish
> Components: general, management
> Reporter: Kirk Lund
> Assignee: Patrick Rhomberg
>
> org.apache.geode.internal.lang.StringUtils duplicates some of the methods in
> org.apache.commons.lang.StringUtils with some inconsistencies.
> isBlank is implemented identically
> isEmpty is inconsistent -- commons version returns true if string is null,
> while geode version returns false if string is null
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)