From 48c21830659f2e81be16d1f3dfaed218ed3d9dc4 Mon Sep 17 00:00:00 2001 From: Adriano Machado <60320+ammachado@users.noreply.github.com> Date: Sat, 24 Feb 2024 06:12:41 -0500 Subject: [PATCH] Save identified type on cache for future lookups (#4039) Co-authored-by: Tim te Beek --- rewrite-java/src/main/java/org/openrewrite/java/ChangeType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/rewrite-java/src/main/java/org/openrewrite/java/ChangeType.java b/rewrite-java/src/main/java/org/openrewrite/java/ChangeType.java index e037a700dc6..34b50170947 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/ChangeType.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/ChangeType.java @@ -430,6 +430,7 @@ private JavaType updateType(@Nullable JavaType oldType) { } else if (oldType instanceof JavaType.FullyQualified) { JavaType.FullyQualified original = TypeUtils.asFullyQualified(oldType); if (isTargetFullyQualifiedType(original)) { + oldNameToChangedType.put(oldType, targetType); return targetType; } } else if (oldType instanceof JavaType.GenericTypeVariable) {