You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/02/23 17:38:39 UTC

[isis] branch master updated: ISIS-2542: polishing prev. commit

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a90cc5  ISIS-2542: polishing prev. commit
3a90cc5 is described below

commit 3a90cc56fff07c86848109ef0aace446e8493a2c
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Feb 23 18:37:23 2021 +0100

    ISIS-2542: polishing prev. commit
---
 .../extensions/secman/jpa/dom/user/ApplicationUserRepository.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUserRepository.java b/extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUserRepository.java
index 4482e14..bb39729 100644
--- a/extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUserRepository.java
+++ b/extensions/security/secman/persistence-jpa/src/main/java/org/apache/isis/extensions/secman/jpa/dom/user/ApplicationUserRepository.java
@@ -120,8 +120,8 @@ implements org.apache.isis.extensions.secman.api.user.ApplicationUserRepository<
 
     @Override
     public Collection<ApplicationUser> find(final @Nullable String _search) {
-        val search = String.format("%s", _Strings.nullToEmpty(_search).replace("*", "%").replace("?", "_"));
-        val regex = _Strings.suffix(_Strings.prefix(search, "%"), "%");
+        val search = _Strings.nullToEmpty(_search).replace("*", "%").replace("?", "_");
+        val regex  = _Strings.suffix(_Strings.prefix(search, "%"), "%");
         return repository.allMatches(Query.named(ApplicationUser.class, NamedQueryNames.USER_FIND)
                 .withParameter("regex", regex))
                 .stream()