summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-30 16:10:06 +0000
committeraclement <aclement>2006-05-30 16:10:06 +0000
commit69d420e8f33b47425c18e4d9bcf4a1595156871e (patch)
tree3fd175efcf347570c51cc8ff31a470af446e24cd
parentb4a28a99e4e7afbf3cefb3b43a6432b24525d7b2 (diff)
downloadaspectj-69d420e8f33b47425c18e4d9bcf4a1595156871e.tar.gz
aspectj-69d420e8f33b47425c18e4d9bcf4a1595156871e.zip
fix for 144465
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java1
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/Options.java4
-rw-r--r--taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java5
3 files changed, 10 insertions, 0 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
index 65e24a6eb..1cff6f265 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
@@ -221,6 +221,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
world.setXnoInline(weaverOption.noInline);
// AMC - autodetect as per line below, needed for AtAjLTWTests.testLTWUnweavable
world.setBehaveInJava5Way(LangUtil.is15VMOrGreater());
+ world.setAddSerialVerUID(weaverOption.addSerialVersionUID);
/* First load defaults */
bcelWorld.getLint().loadDefaultProperties();
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/org/aspectj/weaver/loadtime/Options.java
index 65d837d40..0c1a99b54 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/Options.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/Options.java
@@ -37,6 +37,7 @@ public class Options {
private final static String OPTION_verbose = "-verbose";
private final static String OPTION_reweavable = "-Xreweavable";//notReweavable is default for LTW
private final static String OPTION_noinline = "-Xnoinline";
+ private final static String OPTION_addSerialVersionUID = "-XaddSerialVersionUID";
private final static String OPTION_hasMember = "-XhasMember";
private final static String OPTION_pinpoint = "-Xdev:pinpoint";
private final static String OPTION_showWeaveInfo = "-showWeaveInfo";
@@ -88,6 +89,8 @@ public class Options {
weaverOption.lazyTjp = true;
} else if (arg.equalsIgnoreCase(OPTION_noinline)) {
weaverOption.noInline = true;
+ } else if (arg.equalsIgnoreCase(OPTION_addSerialVersionUID)) {
+ weaverOption.addSerialVersionUID=true;
} else if (arg.equalsIgnoreCase(OPTION_noWarn) || arg.equalsIgnoreCase(OPTION_noWarnNone)) {
weaverOption.noWarn = true;
} else if (arg.equalsIgnoreCase(OPTION_proceedOnError)) {
@@ -151,6 +154,7 @@ public class Options {
boolean verbose;
boolean notReWeavable = true;//default to notReweavable for LTW (faster)
boolean noInline;
+ boolean addSerialVersionUID;
boolean showWeaveInfo;
boolean pinpoint;
IMessageHandler messageHandler;
diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 53d464a2a..1fe5ef833 100644
--- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -294,6 +294,7 @@ public class AjcTask extends MatchingTask {
"reweavable", "reweavable:compress", "notReweavable", "noInline",
"terminateAfterCompilation","hasMember",
"ajruntimetarget:1.2", "ajruntimetarget:1.5",
+ "addSerialVersionUID"
//, "targetNearSource", "OcodeSize",
};
@@ -526,6 +527,10 @@ public class AjcTask extends MatchingTask {
public void setXNotReweavable(boolean notReweavable) {
cmd.addFlag("-XnotReweavable",notReweavable);
}
+
+ public void setXaddSerialVersionUID(boolean addUID) {
+ cmd.addFlag("-XaddSerialVersionUID",addUID);
+ }
public void setXNoInline(boolean noInline) {
cmd.addFlag("-XnoInline",noInline);