From b700ab3bfb4ac02f78d093a190afc0def383b4bc Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 5 Aug 2010 16:50:00 +0000 Subject: 278496: corrected demotion activation --- .../src/org/aspectj/weaver/World.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'org.aspectj.matcher') diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index 798f98ba7..d4b435129 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -1068,12 +1068,12 @@ public abstract class World implements Dump.INode { } List typeMungers = type.getInterTypeMungers(); if (typeMungers == null || typeMungers.size() == 0) { - tMap.remove(key); - insertInExpendableMap(key, type); - demotionCounter++; + tMap.remove(key); + insertInExpendableMap(key, type); + demotionCounter++; + } } } - } addedSinceLastDemote.clear(); } else { // Compile time demotion strategy @@ -1518,14 +1518,16 @@ public abstract class World implements Dump.INode { MessageUtil.info("[completeBinaryTypes=true] Completion of binary types activated")); } - s = p.getProperty(xsetTYPE_DEMOTION, "true"); // default is: ON (for ltw) OFF (for ctw) - boolean b = typeMap.demotionSystemActive; - if (b && s.equalsIgnoreCase("false")) { - System.out.println("typeDemotion=false: type demotion switched OFF"); - typeMap.demotionSystemActive = false; - } else if (!b && s.equalsIgnoreCase("true")) { - System.out.println("typeDemotion=true: type demotion switched ON"); - typeMap.demotionSystemActive = true; + s = p.getProperty(xsetTYPE_DEMOTION); // default is: ON (for ltw) OFF (for ctw) + if (s != null) { + boolean b = typeMap.demotionSystemActive; + if (b && s.equalsIgnoreCase("false")) { + System.out.println("typeDemotion=false: type demotion switched OFF"); + typeMap.demotionSystemActive = false; + } else if (!b && s.equalsIgnoreCase("true")) { + System.out.println("typeDemotion=true: type demotion switched ON"); + typeMap.demotionSystemActive = true; + } } s = p.getProperty(xsetOVERWEAVING, "false"); -- cgit v1.2.3