@Override
 public void visitMemberSelectExpression(MemberSelectExpressionTree tree) {
   String reference = ExpressionsHelper.concatenate(tree);
   if (!isExcluded(reference)) {
     int line = FirstSyntaxTokenFinder.firstSyntaxToken(tree).line();
     if (!reportedLines.contains(line) && isSunClass(reference)) {
       context.addIssue(
           line, this, "Replace this usage of Sun classes by ones from the Java API.");
       reportedLines.add(line);
     }
     super.visitMemberSelectExpression(tree);
   }
 }
예제 #2
0
 private static String getCommentFromTree(Tree tokenTree) {
   return getCommentFromSyntaxToken(FirstSyntaxTokenFinder.firstSyntaxToken(tokenTree));
 }