From a783c635dd68ef176d350d7c0a7beafc480173d1 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 21 Sep 2021 17:48:16 +0200 Subject: [PATCH] #1650 - 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 5de46371..1bf9382f 100644 --- a/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java +++ b/src/main/java/org/springframework/hateoas/server/core/DummyInvocationUtils.java @@ -169,6 +169,7 @@ public class DummyInvocationUtils { if (type.isInterface()) { factory.addInterface(type); } else { + factory.setOptimize(true); factory.setTargetClass(type); factory.setProxyTargetClass(true); }