/** * Re-acquires the last updated timestamp for each URL and returns true if any timestamp has changed. */ public boolean containsChanges() { boolean result = false; // This code would be highly suspect if this method was expected to be invoked // concurrently, but CheckForUpdatesFilter ensures that it will be invoked // synchronously. for (Map.Entry<File, Long> entry : fileToTimestamp.entrySet()) { long newTimestamp = readTimestamp(entry.getKey()); long current = entry.getValue(); if (current == newTimestamp) continue; result = true; entry.setValue(newTimestamp); } return result; }
/** * Re-acquires the last updated timestamp for each URL and returns true if any timestamp has changed. */ public boolean containsChanges() { boolean result = false; // This code would be highly suspect if this method was expected to be invoked // concurrently, but CheckForUpdatesFilter ensures that it will be invoked // synchronously. for (Map.Entry<File, Long> entry : fileToTimestamp.entrySet()) { long newTimestamp = readTimestamp(entry.getKey()); long current = entry.getValue(); if (current == newTimestamp) continue; result = true; entry.setValue(newTimestamp); } return result; }
return fileToTimestamp.get(resourceFile); long timestamp = readTimestamp(resourceFile); long dirTimestamp = readTimestamp(dir); fileToTimestamp.put(dir, dirTimestamp);
return fileToTimestamp.get(resourceFile); long timestamp = readTimestamp(resourceFile); long dirTimestamp = readTimestamp(dir); fileToTimestamp.put(dir, dirTimestamp);