Skip to content

Commit 4b3f9cb

Browse files
committed
CatalogUtils.parseCatalogNumbers(): replace String.split() by StringUtils.split().
StringUtils.split() split by a character not by a regexp and should be faster. No functional changes.
1 parent 9c30a53 commit 4b3f9cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ru/mystamps/web/util/CatalogUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static Set<String> parseCatalogNumbers(String catalogNumbers) {
124124
}
125125

126126
Set<String> result = new LinkedHashSet<>();
127-
for (String number : catalogNumbers.split(",")) {
127+
for (String number : StringUtils.split(catalogNumbers, ',')) {
128128
Validate.isTrue(!number.trim().isEmpty(), "Catalog number must be non empty");
129129

130130
String[] range = StringUtils.split(number, '-');

0 commit comments

Comments
 (0)