in src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java [215:244]
private long getSelfTimestamp() {
// the time stamp of the launcher jar and the bootstrap jar
long selfStamp = this.getTimeStampOfClass(this.getClass(), -1);
selfStamp = this.getTimeStampOfClass(LaunchpadContentProvider.class, selfStamp);
// check whether any bundle is younger than the launcher jar
final File[] directories = this.startupDir.listFiles(DirectoryUtil.DIRECTORY_FILTER);
if ( directories != null ) {
for (final File levelDir : directories) {
// iterate through all files in the startlevel dir
final File[] jarFiles = levelDir.listFiles(DirectoryUtil.BUNDLE_FILE_FILTER);
if ( jarFiles != null ) {
for (final File bundleJar : jarFiles) {
if (bundleJar.lastModified() > selfStamp) {
selfStamp = bundleJar.lastModified();
logger.log(Logger.LOG_INFO, String.format("Newer timestamp from %s : %s", bundleJar, selfStamp));
}
}
}
}
}
logger.log(Logger.LOG_INFO, String.format("Final self timestamp: %s.", selfStamp));
// return the final stamp (may be -1 if launcher jar cannot be checked
// and there are no bundle jar files)
return selfStamp;
}