From 8f321d8ed6373bb3b8a0945838da2b4c3b0f8f8e Mon Sep 17 00:00:00 2001 From: twozniak Date: Wed, 16 Sep 2020 12:27:48 +0200 Subject: [PATCH] tsMethod.setAsync(useAsync); removed from mapReturnType method --- .../implgens/FetchBasedImplementationGenerator.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java b/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java index 4ce855f..8e6c4be 100644 --- a/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java +++ b/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java @@ -159,15 +159,10 @@ public void changeMethodBeforeImplementationGeneration(TSMethod tsMethod) { @Override public TSType mapReturnType(TSMethod tsMethod, TSType tsType) { if (isRestClass(tsMethod.getOwner())) { - tsMethod.setAsync(useAsync); - if (useAsync) { - return tsType; - } else { - if (tsType == TypeMapper.tsVoid) { - return new TSInterfaceReference(promiseInterface, responseInterface); - } - return new TSInterfaceReference(promiseInterface, tsType); + if (tsType == TypeMapper.tsVoid) { + return new TSInterfaceReference(promiseInterface, responseInterface); } + return new TSInterfaceReference(promiseInterface, tsType); } return tsType; }