in src/main/java/org/apache/sling/feature/apiregions/impl/RegionConfiguration.java [191:210]
void storeLocationToConfigMap(BundleContext context) {
File file = context.getBundle().getDataFile(BUNDLE_LOCATION_TO_FEATURE_FILE);
if (file == null) {
Activator.LOG.warning("Cannot store " + BUNDLE_LOCATION_TO_FEATURE_FILE
+ " Persistence not supported by this framework.");
return;
}
Properties p = new Properties();
for (Map.Entry<String, Map.Entry<String, Version>> entry : bundleLocationConfigMap.entrySet()) {
p.setProperty(entry.getKey(), entry.getValue().getKey() + "~" + entry.getValue().getValue());
}
if (p.size() > 0) {
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) {
p.store(os, "Bundle Location to Feature Map");
} catch (IOException e) {
Activator.LOG.log(Level.WARNING, "Unable to store " + BUNDLE_LOCATION_TO_FEATURE_FILE, e);
}
}
}