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

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git


The following commit(s) were added to refs/heads/master by this push:
     new e056559f fix: replace deprecated StringUtils.contains calls in 
ArchetypeSelectorUtils
e056559f is described below

commit e056559febab8fa23581260e14402b1c6fbe3f6e
Author: Harsh Mehta <[email protected]>
AuthorDate: Sat Nov 29 23:34:54 2025 +0530

    fix: replace deprecated StringUtils.contains calls in ArchetypeSelectorUtils
    
    Signed-off-by: Harsh Mehta <[email protected]>
---
 .../maven/archetype/ui/generation/ArchetypeSelectorUtils.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/ArchetypeSelectorUtils.java
 
b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/ArchetypeSelectorUtils.java
index 17756840..7ba2150d 100644
--- 
a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/ArchetypeSelectorUtils.java
+++ 
b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/ArchetypeSelectorUtils.java
@@ -37,12 +37,12 @@ public class ArchetypeSelectorUtils {
     }
 
     private static String extractGroupIdFromFilter(String filter) {
-        return StringUtils.contains(filter, ':') ? 
StringUtils.substringBefore(filter, ":") : null;
+        return filter.contains(":") ? StringUtils.substringBefore(filter, ":") 
: null;
     }
 
     private static String extractArtifactIdFromFilter(String filter) {
         // if no : the full text is considered as artifactId content
-        return StringUtils.contains(filter, ':') ? 
StringUtils.substringAfter(filter, ":") : filter;
+        return filter.contains(":") ? StringUtils.substringAfter(filter, ":") 
: filter;
     }
 
     /**
@@ -66,8 +66,8 @@ public class ArchetypeSelectorUtils {
                 String groupId = 
ArchetypeSelectorUtils.extractGroupIdFromFilter(filter);
                 String artifactId = 
ArchetypeSelectorUtils.extractArtifactIdFromFilter(filter);
 
-                if (((groupId == null) || 
StringUtils.contains(archetype.getGroupId(), groupId))
-                        && StringUtils.contains(archetype.getArtifactId(), 
artifactId)) {
+                if (((groupId == null) || 
archetype.getGroupId().contains(groupId))
+                        && archetype.getArtifactId().contains(artifactId)) {
                     archetypes.add(archetype);
                 }
             }

Reply via email to