in src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java [1056:1085]
public void resourceAddedOrUpdated(final String resourceType,
final String entityId,
final InputStream is,
final Dictionary<String, Object> dict,
final Map<String, Object> attributes) {
try {
final UpdateInfo ui = new UpdateInfo();
ui.data = ResourceData.create(is, dict);
ui.resourceType = resourceType;
ui.dict = dict;
ui.entityId = entityId;
ui.attributes = attributes;
synchronized ( this.resourcesLock ) {
updateInfos.add(ui);
this.wakeUp();
}
} catch (final IOException ioe) {
logger.error("Unable to handle resource add or update of " + resourceType + ':' + entityId, ioe);
} finally {
// always close the input stream!
if ( is != null ) {
try {
is.close();
} catch (final IOException ignore) {
// ignore
}
}
}
}