bundle/src/main/java/org/apache/karaf/cellar/bundle/management/internal/CellarBundleMBeanImpl.java [606:656]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                bundles.add(bundle);
                            }
                        }
                    } else {
                        // no bundle name, fall back to id and check if it matches the regex
                        matcher = namePattern.matcher(bundleSplit[0]);
                        if (matcher.matches()) {
                            bundles.add(bundle);
                        }
                    }
                }
            }
            return;
        }

        // id is just name
        // regex support on the name
        Pattern namePattern = Pattern.compile(nameId);
        // looking for bundle using only the name
        for (String bundle : clusterBundles.keySet()) {
            BundleState state = clusterBundles.get(bundle);
            if (state.getName() != null) {
                // bundle name is populated, check if it matches the regex
                matcher = namePattern.matcher(state.getName());
                if (matcher.matches()) {
                    bundles.add(bundle);
                } else {
                    // no match on bundle name, fall back to id and check if it matches the regex
                    String[] idSplit = bundle.split("/");
                    matcher = namePattern.matcher(idSplit[0]);
                    if (matcher.matches()) {
                        bundles.add(bundle);
                    }
                }
            } else if (state.getSymbolicName() != null) {
                // bundle symbolic name is populated, check if it matches the regex
                matcher = namePattern.matcher(state.getSymbolicName());
                if (matcher.matches()) {
                    bundles.add(bundle);
                } else {
                    // no match on bundle symbolic name, fall back to id and check if it matches the regex
                    String[] idSplit = bundle.split("/");
                    matcher = namePattern.matcher(idSplit[0]);
                    if (matcher.matches()) {
                        bundles.add(bundle);
                    }
                }
            } else {
                // no bundle name, fall back to id and check if it matches the regex
                String[] idSplit = bundle.split("/");
                matcher = namePattern.matcher(idSplit[0]);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/BundleCommandSupport.java [139:189]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                bundles.add(bundle);
                            }
                        }
                    } else {
                        // no bundle name, fall back to id and check if it matches the regex
                        matcher = namePattern.matcher(bundleSplit[0]);
                        if (matcher.matches()) {
                            bundles.add(bundle);
                        }
                    }
                }
            }
            return;
        }

        // id is just name
        // regex support on the name
        Pattern namePattern = Pattern.compile(nameId);
        // looking for bundle using only the name
        for (String bundle : clusterBundles.keySet()) {
            BundleState state = clusterBundles.get(bundle);
            if (state.getName() != null) {
                // bundle name is populated, check if it matches the regex
                matcher = namePattern.matcher(state.getName());
                if (matcher.matches()) {
                    bundles.add(bundle);
                } else {
                    // no match on bundle name, fall back to id and check if it matches the regex
                    String[] idSplit = bundle.split("/");
                    matcher = namePattern.matcher(idSplit[0]);
                    if (matcher.matches()) {
                        bundles.add(bundle);
                    }
                }
            } else if (state.getSymbolicName() != null) {
                // bundle symbolic name is populated, check if it matches the regex
                matcher = namePattern.matcher(state.getSymbolicName());
                if (matcher.matches()) {
                    bundles.add(bundle);
                } else {
                    // no match on bundle symbolic name, fall back to id and check if it matches the regex
                    String[] idSplit = bundle.split("/");
                    matcher = namePattern.matcher(idSplit[0]);
                    if (matcher.matches()) {
                        bundles.add(bundle);
                    }
                }
            } else {
                // no bundle name, fall back to id and check if it matches the regex
                String[] idSplit = bundle.split("/");
                matcher = namePattern.matcher(idSplit[0]);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



