HADOOP-14354. SysInfoWindows is not thread safe. Contributed by Inigo Goiri

(cherry picked from commit 689fb2fc66)
This commit is contained in:
Chris Douglas 2017-04-27 16:26:39 -07:00 committed by Masatake Iwasaki
parent 3969327077
commit d50f5b7df4
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ public class SysInfoWindows extends SysInfo {
return null;
}
void refreshIfNeeded() {
synchronized void refreshIfNeeded() {
long now = now();
if (now - lastRefreshTime > REFRESH_INTERVAL_MS) {
long refreshInterval = now - lastRefreshTime;