String [] strArr = null;
if (jar == null) {
throw new Exception("invalid input to getDependencies");
}
Manifest mf = jar.getManifest();
if (mf == null) return strArr;
Attributes attrs = mf.getMainAttributes();
if (attrs == null) return strArr;
Set<Map.Entry<Object, Object>> mfattrs = attrs.entrySet();
String key, val;
for (Map.Entry<Object,Object> entry : mfattrs) {
key = ((Attributes.Name) entry.getKey()).toString();
val = (String) entry.getValue();
if (! key.equals("Add-On-Dependencies")) continue;
if (val.contains(",")) {
strArr = val.split(",");
} else {
strArr = new String[1];
strArr[0] = val;
}
}
return strArr;