From 5523dfbb2a00fca42d25e84938749be508c345e3 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 21 Sep 2021 17:48:16 +0200 Subject: [PATCH] #1649 - Improve proxy creation in DummyInvocationUtils. We now explicitly set the optimize flag on the ProxyFactory for class based proxies used to create dummy invocation proxies. Still needs the upgrade to Spring Framework 5.3.11 (spring-projects/spring-framework#27439, #1647) to create full effect. --- .../hateoas/server/core/DummyInvocationUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java b/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java index e05a92f6..5db512f9 100644 --- a/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java +++ b/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java @@ -194,6 +194,7 @@ public class DummyInvocationUtils { if (type.isInterface()) { factory.addInterface(type); } else { + factory.setOptimize(true); factory.setTargetClass(type); factory.setProxyTargetClass(true); }