Project

General

Profile

« Previous | Next » 

Revision f4935f27

Added by Patrick Plitzner about 5 years ago

ref #8041 Use CdmUtils.quoteRegExWithWildcard(pattern) for search string

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
17 17
import org.springframework.security.core.GrantedAuthority;
18 18

  
19 19
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
20
import eu.etaxonomy.cdm.common.CdmUtils;
20 21
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
21 22
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
22 23
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
......
61 62
		model = new ArrayList<>();
62 63

  
63 64
		for(GrantedAuthorityImpl authority : authorities){
64
		    if ( pattern == null || authority.getAuthority().matches(pattern +".*")){
65
		    if ( pattern == null || authority.getAuthority().matches(CdmUtils.quoteRegExWithWildcard(pattern) +".*")){
65 66
		        model.add(new UuidAndTitleCache<>(GrantedAuthorityImpl.class, authority.getUuid(), authority.getId(), String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority))));
66 67
		    }
67 68
		}

Also available in: Unified diff