(
@Nullable TypeMirror a, @Nullable TypeMirror b, Set<ComparedElements> visiting)
| 319 | } |
| 320 | |
| 321 | @SuppressWarnings("TypeEquals") |
| 322 | private static boolean equal( |
| 323 | @Nullable TypeMirror a, @Nullable TypeMirror b, Set<ComparedElements> visiting) { |
| 324 | if (a == b) { |
| 325 | return true; |
| 326 | } |
| 327 | if (a == null || b == null) { |
| 328 | return false; |
| 329 | } |
| 330 | // TypeMirror.equals is not guaranteed to return true for types that are equal, but we can |
| 331 | // assume that if it does return true then the types are equal. This check also avoids getting |
| 332 | // stuck in infinite recursion when Eclipse decrees that the upper bound of the second K in |
| 333 | // <K extends Comparable<K>> is a distinct but equal K. |
| 334 | // The javac implementation of ExecutableType, at least in some versions, does not take thrown |
| 335 | // exceptions into account in its equals implementation, so avoid this optimization for |
| 336 | // ExecutableType. |
| 337 | @SuppressWarnings("TypesEquals") |
| 338 | boolean equal = a.equals(b); |
| 339 | if (equal && a.getKind() != TypeKind.EXECUTABLE) { |
| 340 | return true; |
| 341 | } |
| 342 | EqualVisitorParam p = new EqualVisitorParam(); |
| 343 | p.type = b; |
| 344 | p.visiting = visiting; |
| 345 | return a.accept(EqualVisitor.INSTANCE, p); |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Returns the type of the innermost enclosing instance, or null if there is none. This is the |
no test coverage detected