File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ static String getEntitlementTypeName(Class<? extends Entitlement> entitlementCla
8080 }
8181
8282 var strippedClassName = entitlementClassName .substring (0 , entitlementClassName .indexOf ("Entitlement" ));
83- return Arrays .stream (strippedClassName .split ("(?=\\ p{Lu})" ))
83+ // Identify word boundaries by uppercase letters with \p{Lu}, but retain those
84+ // characters, rather than discarding them as separators, with (?=).
85+ String [] words = strippedClassName .split ("(?=\\ p{Lu})" );
86+ return Arrays .stream (words )
8487 .filter (Predicate .not (String ::isEmpty ))
8588 .map (s -> s .toLowerCase (Locale .ROOT ))
8689 .collect (Collectors .joining ("_" ));
You can’t perform that action at this time.
0 commit comments