in src/main/java/org/apache/sling/models/impl/ModelPackageBundleListener.java [199:213]
public void removedBundle(Bundle bundle, BundleEvent event, ServiceRegistration[] object) {
for (ServiceRegistration reg : object) {
ServiceReference ref = reg.getReference();
String[] adapterTypeNames = PropertiesUtil.toStringArray(ref.getProperty(AdapterFactory.ADAPTER_CLASSES));
if (adapterTypeNames != null) {
String implTypeName = PropertiesUtil.toString(ref.getProperty(PROP_IMPLEMENTATION_CLASS), null);
for (String adapterTypeName : adapterTypeNames) {
adapterImplementations.remove(adapterTypeName, implTypeName);
}
}
reg.unregister();
}
adapterImplementations.removeResourceTypeBindings(bundle);
}