]> source.dussan.org Git - aspectj.git/commitdiff
fix for 144465
authoraclement <aclement>
Tue, 30 May 2006 16:10:06 +0000 (16:10 +0000)
committeraclement <aclement>
Tue, 30 May 2006 16:10:06 +0000 (16:10 +0000)
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
loadtime/src/org/aspectj/weaver/loadtime/Options.java
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java

index 65e24a6eb995883d30901e55f8bf867c2d08473e..1cff6f2654cf7e039c3710bf4756e4cfc8ea4835 100644 (file)
@@ -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();
index 65d837d400773cf641aa501fe93ce70a89c7650a..0c1a99b5488a7c0f563151804f120b047e2af05a 100644 (file)
@@ -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;
index 53d464a2a00f7b6c3add8088b2b75e970d32e13c..1fe5ef83390f47c9a4fb99b5f87cd3dac4422382 100644 (file)
@@ -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);