@@ -851,7 +851,8 @@ int resolveBatchConcurrency() {
851851 }
852852
853853 private static final Set <String > DEFAULT_WORKSPACE_DISCOVERY_IGNORE =
854- Set .of ("**/node_modules/**" , "**/.git/**" , "**/target/**" , "**/__pycache__/**" , "**/.venv/**" );
854+ Set .of (
855+ "**/node_modules/**" , "**/.git/**" , "**/target/**" , "**/__pycache__/**" , "**/.venv/**" );
855856
856857 /** Merges default ignore patterns, env var overrides, and caller-provided patterns. */
857858 Set <String > resolveIgnorePatterns (Set <String > callerPatterns ) {
@@ -1023,27 +1024,12 @@ private List<Path> discoverUvWorkspaceMembers(Path workspaceDir, Set<String> ign
10231024 return Collections .emptyList ();
10241025 }
10251026
1026- List <String > memberPatterns = new ArrayList <>();
1027- for (int i = 0 ; i < membersArray .size (); i ++) {
1028- String pattern = membersArray .getString (i );
1029- if (pattern != null && !pattern .isBlank ()) {
1030- memberPatterns .add (pattern .trim ());
1031- }
1032- }
1027+ List <String > memberPatterns = toStringList (membersArray );
10331028 if (memberPatterns .isEmpty ()) {
10341029 return Collections .emptyList ();
10351030 }
10361031
1037- Set <String > excludePatterns = new java .util .HashSet <>();
1038- TomlArray excludeArray = workspaceConfig .getArray ("exclude" );
1039- if (excludeArray != null ) {
1040- for (int i = 0 ; i < excludeArray .size (); i ++) {
1041- String pattern = excludeArray .getString (i );
1042- if (pattern != null && !pattern .isBlank ()) {
1043- excludePatterns .add (pattern .trim ());
1044- }
1045- }
1046- }
1032+ List <String > excludePatterns = toStringList (workspaceConfig .getArray ("exclude" ));
10471033
10481034 List <PathMatcher > memberMatchers =
10491035 memberPatterns .stream ()
@@ -1084,6 +1070,20 @@ private List<Path> discoverUvWorkspaceMembers(Path workspaceDir, Set<String> ign
10841070 }
10851071 }
10861072
1073+ static List <String > toStringList (TomlArray array ) {
1074+ if (array == null ) {
1075+ return List .of ();
1076+ }
1077+ List <String > result = new ArrayList <>();
1078+ for (int i = 0 ; i < array .size (); i ++) {
1079+ String s = array .getString (i );
1080+ if (s != null && !s .isBlank ()) {
1081+ result .add (s .trim ());
1082+ }
1083+ }
1084+ return result ;
1085+ }
1086+
10871087 /**
10881088 * Discovers Maven multi-module workspace manifests by invoking {@code mvn help:evaluate} to list
10891089 * declared modules, then recursively checking each module for nested aggregators.
0 commit comments