aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2007-01-09 13:13:46 +0000
committeraclement <aclement>2007-01-09 13:13:46 +0000
commitffebf4f882fe2c0a3a30b4f6b33918e2140fa4e2 (patch)
treec78e699c0da8a04d211d84a38f824d086c203936
parent6cf03da38e931dd898a845dd94d6f92a981c12f0 (diff)
downloadaspectj-ffebf4f882fe2c0a3a30b4f6b33918e2140fa4e2.tar.gz
aspectj-ffebf4f882fe2c0a3a30b4f6b33918e2140fa4e2.zip
made synchronized method message a lint warning
-rw-r--r--weaver/src/org/aspectj/weaver/Lint.java3
-rw-r--r--weaver/src/org/aspectj/weaver/XlintDefault.properties3
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java4
3 files changed, 6 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/Lint.java b/weaver/src/org/aspectj/weaver/Lint.java
index 5dc5bf065..1dcf127d7 100644
--- a/weaver/src/org/aspectj/weaver/Lint.java
+++ b/weaver/src/org/aspectj/weaver/Lint.java
@@ -124,6 +124,9 @@ public class Lint {
new Kind("cantFindType","{0}");
public final Kind cantFindTypeAffectingJoinPointMatch = new Kind("cantFindTypeAffectingJPMatch","{0}");
+
+ public final Kind advisingSynchronizedMethods = new Kind("advisingSynchronizedMethods",
+ "advice matching the synchronized method shadow ''{0}'' will be executed outside the lock rather than inside (compiler limitation)");
private static Trace trace = TraceFactory.getTraceFactory().getTrace(Lint.class);
diff --git a/weaver/src/org/aspectj/weaver/XlintDefault.properties b/weaver/src/org/aspectj/weaver/XlintDefault.properties
index d1d0776df..e10fa4797 100644
--- a/weaver/src/org/aspectj/weaver/XlintDefault.properties
+++ b/weaver/src/org/aspectj/weaver/XlintDefault.properties
@@ -40,4 +40,5 @@ cantFindTypeAffectingJPMatch = warning
unorderedAdviceAtShadow=ignore
swallowedExceptionInCatchBlock=ignore
-calculatingSerialVersionUID=ignore \ No newline at end of file
+calculatingSerialVersionUID=ignore
+advisingSynchronizedMethods=warning \ No newline at end of file
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
index 52483b472..857f59dea 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
@@ -223,9 +223,7 @@ public class BcelAdvice extends Advice {
if (shadow.getIWorld().isJoinpointSynchronizationEnabled() &&
shadow.getKind()==Shadow.MethodExecution &&
(s.getSignature().getModifiers() & Modifier.SYNCHRONIZED)!=0) {
- Message m = new Message("advice matching the synchronized method shadow '"+shadow.toString()+
- "' will be executed outside the lock rather than inside (compiler limitation)",shadow.getSourceLocation(),false,new ISourceLocation[]{getSourceLocation()});
- shadow.getIWorld().getMessageHandler().handleMessage(m);
+ shadow.getIWorld().getLint().advisingSynchronizedMethods.signal(new String[]{shadow.toString()},shadow.getSourceLocation(),new ISourceLocation[]{getSourceLocation()});
}
//FIXME AV - see #75442, this logic is not enough so for now comment it out until we fix the bug