Bug 76798 - Add versions to woven class files - enabling better backwards compatibility.
Summary: Add versions to woven class files - enabling better backwards compatibility.
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.2.1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-22 07:04 EDT by Andrew Clement CLA
Modified: 2005-01-05 06:03 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 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.