From c5421954410a1da727953c28b352c7d6673d4bd3 Mon Sep 17 00:00:00 2001 From: Hlias Mpourdakos <115589434+HliasMpGH@users.noreply.github.com> Date: Tue, 4 Jun 2024 09:56:50 +0300 Subject: [PATCH] fix infinite recursion bug on methodcall (#15) --- src/main/java/com/squareup/javapoet/TypeSpec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/squareup/javapoet/TypeSpec.java b/src/main/java/com/squareup/javapoet/TypeSpec.java index 44d9bc9..2296129 100644 --- a/src/main/java/com/squareup/javapoet/TypeSpec.java +++ b/src/main/java/com/squareup/javapoet/TypeSpec.java @@ -610,7 +610,7 @@ public Builder addSuperinterface(Type superinterface, boolean avoidNestedTypeNam public Builder addPermits(Iterable permits) { checkArgument(permits != null, "permits == null"); for (TypeName permit : permits) { - addPermits(permits); + addPermits(permit); } return this; }