changes.
[IRC.git] / Robust / src / Analysis / SSJava / MethodAnnotationCheck.java
index 778c0553c5fe3699a88a79d060ce14bdcfd677c8..9ed0123f3bf71c9e0e6358c146fb30ab3b321fb9 100644 (file)
@@ -64,7 +64,7 @@ public class MethodAnnotationCheck {
       ClassDescriptor cd = (ClassDescriptor) obj;
       toanalyze.remove(cd);
 
-      if (!cd.isInterface()) {
+      if (!ssjava.isSSJavaUtil(cd) && !cd.isInterface()) {
         for (Iterator method_it = cd.getMethods(); method_it.hasNext();) {
           MethodDescriptor md = (MethodDescriptor) method_it.next();
           checkTrustworthyMethodAnnotation(md);
@@ -76,7 +76,9 @@ public class MethodAnnotationCheck {
 
     for (Iterator iterator = annotatedMDSet.iterator(); iterator.hasNext();) {
       MethodDescriptor md = (MethodDescriptor) iterator.next();
-      ssjava.addAnnotationRequire(md);
+      if (!ssjava.isTrustMethod(md)) {
+        ssjava.addAnnotationRequire(md);
+      }
     }
 
     Set<Pair> visited = new HashSet<Pair>();
@@ -95,7 +97,7 @@ public class MethodAnnotationCheck {
           if (!visited.contains(p)) {
             visited.add(p);
 
-            if (!ssjava.isTrustMethod(calleeMD)) {
+            if (!ssjava.isTrustMethod(callerMD) && !ssjava.isTrustMethod(calleeMD)) {
               // if method is annotated as "TRUST", do not need to check for
               // linear type & flow-down rule
               tovisit.add(calleeMD);