]> source.dussan.org Git - aspectj.git/commitdiff
made synchronized method message a lint warning
authoraclement <aclement>
Tue, 9 Jan 2007 13:13:46 +0000 (13:13 +0000)
committeraclement <aclement>
Tue, 9 Jan 2007 13:13:46 +0000 (13:13 +0000)
weaver/src/org/aspectj/weaver/Lint.java
weaver/src/org/aspectj/weaver/XlintDefault.properties
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java

index 5dc5bf065ca40dad0b956bfa8a032976feab608c..1dcf127d7cbcb2cb7d6530397df4bd33a8255b8d 100644 (file)
@@ -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);
        
index d1d0776dfa90c640c7973c606de250a9f2c6dc10..e10fa4797bbf05b480bfb37ae9be21d99458a781 100644 (file)
@@ -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
index 52483b472bfc4637da8366252738d1adf0ec3439..857f59dea55fde825f2fd2564fa790bdf341ed41 100644 (file)
@@ -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