コード例 #1
0
 @Nullable
 private ExceptionInfo findCatch(PsiType thrownType) {
   final Iterator<ExceptionInfo> iterator = myCaughtExceptionInfos.descendingIterator();
   while (iterator.hasNext()) {
     final ExceptionInfo info = iterator.next();
     final GrCatchClause clause = info.myClause;
     final GrParameter parameter = clause.getParameter();
     if (parameter != null) {
       final PsiType type = parameter.getType();
       if (type.isAssignableFrom(thrownType)) return info;
     }
   }
   return null;
 }
コード例 #2
0
 private static boolean catchClausesAreEquivalent(GrCatchClause clause1, GrCatchClause clause2) {
   return parametersAreEquivalent(clause1.getParameter(), clause2.getParameter())
       && openBlocksAreEquivalent(clause1.getBody(), clause2.getBody());
 }