diff options
author | aclement <aclement> | 2010-03-03 19:07:07 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-03-03 19:07:07 +0000 |
commit | d4f375e4f6484bd70776d12edf5cf32a2398851f (patch) | |
tree | eeff8c518774eb3a6c4378d860d7fda931f2d00f | |
parent | a8af466d3bc15e65a6f213cdd2ca88d2305a6074 (diff) | |
download | aspectj-d4f375e4f6484bd70776d12edf5cf32a2398851f.tar.gz aspectj-d4f375e4f6484bd70776d12edf5cf32a2398851f.zip |
303924: fix
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index c030e779e..b4e36cf4d 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -83,6 +83,7 @@ import org.aspectj.weaver.patterns.BindingTypePattern; import org.aspectj.weaver.patterns.ConcreteCflowPointcut; import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.DeclareParents; +import org.aspectj.weaver.patterns.DeclareTypeErrorOrWarning; import org.aspectj.weaver.patterns.FastMatchInfo; import org.aspectj.weaver.patterns.IfPointcut; import org.aspectj.weaver.patterns.KindedPointcut; @@ -1516,11 +1517,9 @@ public class BcelWeaver { // ().getFileName(), wsi.getUnwovenClassFileData())); // new: reweavable default with clever diff if (!world.isOverWeaving()) { - byte[] bytes = wsi.getUnwovenClassFileData(classType.getJavaClass().getBytes()); classType.setJavaClass(Utility.makeJavaClass(classType.getJavaClass().getFileName(), bytes), true); - // } else { - // System.out.println("overweaving " + className); + classType.getResolvedTypeX().ensureConsistent(); } // } else { // classType.resetState(); @@ -1832,6 +1831,8 @@ public class BcelWeaver { inReweavableMode); } + // checkDeclareTypeErrorOrWarning(world, classType); + if (mightNeedBridgeMethods) { isChanged = BcelClassWeaver.calculateAnyRequiredBridgeMethods(world, clazz) || isChanged; } @@ -1863,6 +1864,8 @@ public class BcelWeaver { String messageText = "trouble in: \n" + classDebugInfo; getWorld().getMessageHandler().handleMessage(new Message(messageText, IMessage.ABORT, re, null)); } +// } else { +// checkDeclareTypeErrorOrWarning(world, classType); } // this is very odd return behavior trying to keep everyone happy /* @@ -1900,6 +1903,22 @@ public class BcelWeaver { // ---- writing +/* private void checkDeclareTypeErrorOrWarning(BcelWorld world2, BcelObjectType classType) { + List<DeclareTypeErrorOrWarning> dteows = world.getDeclareTypeEows(); + for (DeclareTypeErrorOrWarning dteow : dteows) { + if (dteow.getTypePattern().matchesStatically(classType.getResolvedTypeX())) { + if (dteow.isError()) { + world.getMessageHandler().handleMessage( + MessageUtil.error(dteow.getMessage(), classType.getResolvedTypeX().getSourceLocation())); + } else { + world.getMessageHandler().handleMessage( + MessageUtil.warn(dteow.getMessage(), classType.getResolvedTypeX().getSourceLocation())); + } + } + } + } +*/ + private void dumpUnchanged(UnwovenClassFile classFile) throws IOException { if (zipOutputStream != null) { writeZipEntry(getEntryName(classFile.getJavaClass().getClassName()), classFile.getBytes()); |