Bug 33990 - .class file time-stamps out of sync with .java files
Summary: .class file time-stamps out of sync with .java files
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-06 11:48 EST by John Pitman CLA
Modified: 2003-03-11 04:57 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Pitman CLA 2003-03-06 11:48:43 EST
After compiling a .java file, the incremental java builder checks if the new 
bytecodes are identical to those in the corresponding .class file (it actually 
does a byte-by-byte comparison), and if they are identical, it does not update 
the class file.

This leaves the .class file with a time-stamp that is older than the 
corresponding .java file, which can confuse external tools like RMIC that rely 
on comparing time-stamps to detect if a file is out-of-date.

The builder should at least update the timestamp on the .class file in this 
case.
Comment 1 Philipe Mulet CLA 2003-03-06 12:11:50 EST
However I suspect this would be detected as a resource change for dependents, 
which is exactly what we are trying to avoid.

Comment 2 Philipe Mulet CLA 2003-03-06 12:13:33 EST
Actually, usually this would only be an issue for user edited files, when the 
edit did not modify anything in the binaries (like a minor comment 
modification).

Dependent files which are recompiled did not get edited.
Comment 3 Philipe Mulet CLA 2003-03-06 12:17:40 EST
In case the original source got modified in the build iteration, and we could 
not attempt to reuse the bytes (or still touch the file).

Need to investigate.

John - how critical is this ?
Comment 4 Philipe Mulet CLA 2003-03-06 12:37:14 EST
Since fix is quite trivial, we will try to sneak it in for RC2.
Comment 5 Kent Johnson CLA 2003-03-06 12:39:53 EST
Released a fix for consideration.
Comment 6 Philipe Mulet CLA 2003-03-06 17:54:33 EST
Integrated for RC2.

John - do you need it backported in 2.0.x stream ?
Comment 7 John Pitman CLA 2003-03-07 08:13:55 EST
No, at this time it does not need to be backported.
Comment 8 David Audel CLA 2003-03-11 04:57:57 EST
Verified.