This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.openide.util.*;
import org.openide.modules.*;
}
// #206365: handle specially OSGi bundles
if (m.getManifest().getMainAttributes().getValue("Bundle-SymbolicName") != null) {
String requireBundle;
if ((requireBundle = m.getManifest().getMainAttributes().getValue("Require-Bundle")) != null) {
StringBuilder sb = new StringBuilder();
// http://stackoverflow.com/questions/1757065/java-splitting-a-comma-separated-string-but-ignoring-commas-in-quotes
for (String dep : requireBundle.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)")) {
Matcher matcher = Pattern.compile("([^;]+)(.*)").matcher(dep);
if (!matcher.matches()) {
throw new IllegalStateException("Could not parse dependency: " + dep + " in " + m);
String requiredBundleName = matcher.group(1); // dep CNB
if (requiredBundleName != null && requiredBundleName.length() > 0) {
Module m2 = modulesByName.get(requiredBundleName);
if (m2 != null) {
s.add(m2);
// end of #206365
s.remove(m);
if (transitive) {
Set<Module> toAdd;