String resolvedRevision = null;
if (options.isForce()) {
Message.verbose("refresh mode: no check for cached resolved revision for " + mrid);
return null;
}
PropertiesFile cachedResolvedRevision = getCachedDataFile(mrid);
String expiration = cachedResolvedRevision.getProperty("expiration.time");
if (expiration == null) {
Message.verbose("no cached resolved revision for " + mrid);
return null;
}
if (System.currentTimeMillis() > Long.parseLong(expiration)) {
Message.verbose("cached resolved revision expired for " + mrid);
return null;
}
resolvedRevision = cachedResolvedRevision.getProperty("resolved.revision");
if (resolvedRevision == null) {
Message.verbose("no cached resolved revision value for " + mrid);
return null;
}
return resolvedRevision;