The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 55014505 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Eliminate JDK11-specific method call from indexing logic. (#1825)

parent d542bac3
No related merge requests found
...@@ -125,7 +125,7 @@ public class WorkKeys ...@@ -125,7 +125,7 @@ public class WorkKeys
) { ) {
String normalized = transliterator != null ? transliterator.transliterate(s) String normalized = transliterator != null ? transliterator.transliterate(s)
: Normalizer.normalize(s, Normalizer.Form.NFKC); : Normalizer.normalize(s, Normalizer.Form.NFKC);
if (!includeRegEx.isBlank()) { if (!includeRegEx.chars().allMatch(Character::isWhitespace)) {
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
Matcher m = Pattern.compile(includeRegEx).matcher(normalized); Matcher m = Pattern.compile(includeRegEx).matcher(normalized);
while (m.find()) { while (m.find()) {
...@@ -133,7 +133,7 @@ public class WorkKeys ...@@ -133,7 +133,7 @@ public class WorkKeys
} }
normalized = result.toString(); normalized = result.toString();
} }
if (!excludeRegEx.isBlank()) { if (!excludeRegEx.chars().allMatch(Character::isWhitespace)) {
normalized = normalized.replaceAll(excludeRegEx, ""); normalized = normalized.replaceAll(excludeRegEx, "");
} }
int length = normalized.length(); int length = normalized.length();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment