From: aclement Date: Tue, 30 May 2006 16:10:06 +0000 (+0000) Subject: fix for 144465 X-Git-Tag: V1_5_2rc1~87 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=69d420e8f33b47425c18e4d9bcf4a1595156871e;p=aspectj.git fix for 144465 --- 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);