Bug 76798

Summary: Add versions to woven class files - enabling better backwards compatibility.
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: Andrew Clement <aclement>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.2   
Target Milestone: 1.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrew Clement CLA 2004-10-22 07:04:41 EDT
We don't currently include a version in the class files that come out of the
weaver.  This can cause problems.  For example, if we add a new attribute to a
class file in a future version of AspectJ, then that attribute will cause older
versions of AspectJ to blow up if they encounter it.  If we include a version in
the class file we can rev the version number when we add attributes (or change
the class file form in another way), and by checking that version number in the
weaver we can better determine whether we should fail if we encounter a new
attribute (or other change), or if it is safe to continue processing.

I will add a new WeaverVersion attribute that includes 2 shorts.  Major and Minor.

Encountering a major version in a class file that is greater than the version a
particular weaver is designed to understand will cause compilation to fail.

Encountering a minor version in a class file that is greater than the minor
version a particular weaver is designed to understand will not cause compilation
to fail - we will assume it is safe to continue.
Comment 1 Andrew Clement CLA 2004-10-22 07:06:04 EDT
fix checked in - waiting for build.
Comment 2 Andrew Clement CLA 2005-01-05 06:03:59 EST
fix available.