[MAGNOLIA-4870] Move SplitUtil to core ? Created: 25/Feb/13  Updated: 10/Mar/21  Resolved: 10/Mar/21

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Testcase included:
Yes

 Description   

Countless times, I wrote utility methods, or tests, to validate a usage of some split method. Typically, we need to split comma-separated value input strings.

A quick check on Magnolia-core reveals inconsistent and error-prone usage of several different methods: grep -ri split magnolia-core/

None of these usages really provide a safe output; in some cases we trim the input, but in most cases an input of " a, b,c" will yield different results than "a,b,c", and that is most likely not desired.

Here's a proposal to move a utility class I wrote for the external-indexer module, along its extensive unit tests. If this goes through, you'll certainly want to check the current usages of StringUtils.split() and String.split() !

git@git.magnolia-cms.com:forge/external-indexing


Generated at Mon Feb 12 03:59:49 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.