private static UsageInfo @NotNull [] map2Usages(Collection<? extends Pair<SmartPsiElementPointer<PsiElement>, PsiType>> usages) {
    return ContainerUtil.map2Array(usages, new UsageInfo[usages.size()], pair -> {
      final PsiElement element = pair.getFirst().getElement();
      LOG.assertTrue(element != null);
      return new UsageInfo(element) {
        @Override
        @Nullable
        public String getTooltipText() {
          if (element instanceof PsiExpression expression) {
            final PsiType type = expression.isValid() ? expression.getType() : null;
            if (type == null) return null;
            return JavaBundle.message("type.migration.cannot.convert.tooltip", type.getCanonicalText(), pair.getSecond().getCanonicalText());
          }
          else {
            return JavaBundle.message("type.migration.cannot.convert.vararg.tooltip");
          }
        }
      };
    });
  }
private static UsageInfo @NotNull [] map2Usages(Collection<? extends Pair<SmartPsiElementPointer<PsiElement>, PsiType>> usages)