6533516: Warning needed for file with future time stamps

Reviewed-by: jjg, vromero
This commit is contained in:
Paul Govereau 2014-02-26 18:05:02 -08:00 committed by Jonathan Gibbons
parent f6250d7784
commit dd0e29f8b7
3 changed files with 7 additions and 1 deletions

View File

@ -71,6 +71,8 @@ class RegularFileObject extends BaseFileObject {
}
this.name = name;
this.file = f;
if (f.lastModified() > System.currentTimeMillis())
fileManager.log.warning("file.from.future", f);
}
@Override

View File

@ -1158,6 +1158,10 @@ compiler.misc.x.print.processor.info=\
compiler.misc.x.print.rounds=\
Round {0}:\n\tinput files: {1}\n\tannotations: {2}\n\tlast round: {3}
# 0: file name
compiler.warn.file.from.future=\
Modification date is in the future for file {0}
#####
## The following string will appear before all messages keyed as:

View File

@ -110,4 +110,4 @@ compiler.warn.unexpected.archive.file # Paths: zip file with u
compiler.warn.unknown.enum.constant # in bad class file
compiler.warn.unknown.enum.constant.reason # in bad class file
compiler.warn.override.equals.but.not.hashcode # when a class overrides equals but not hashCode method from Object
compiler.warn.file.from.future # warning for future modification times on files