From bb6a0cded7fb08ba703eb0eb2650673fce59378b Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Wed, 9 Dec 2015 18:40:35 +0300 Subject: [PATCH] guava type migration: process wildcards for transformAndConcat() IDEA-148094 --- .../rules/guava/FluentIterableConversionUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/FluentIterableConversionUtil.java b/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/FluentIterableConversionUtil.java index 4ec0e490543f..e661d394acb9 100644 --- a/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/FluentIterableConversionUtil.java +++ b/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/FluentIterableConversionUtil.java @@ -188,10 +188,13 @@ public class FluentIterableConversionUtil { PsiClass iterable, PsiClass collection) { if (retValue == null) return false; - final PsiType type = retValue.getType(); + PsiType type = retValue.getType(); if (PsiType.NULL.equals(type)) { return true; } + if (type instanceof PsiCapturedWildcardType) { + type = ((PsiCapturedWildcardType)type).getUpperBound(); + } if (type instanceof PsiClassType) { final PsiClass resolvedClass = ((PsiClassType)type).resolve();