From dd1c4d6935840644f35922b5b5f43f26edc4bab2 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 21 Jun 2017 17:33:28 +0200 Subject: [PATCH] DATACMNS-1095 - Made ObjectInstantiator public to avoid IllegalAccessErrors. ObjectInstantiator needs to be declared public as otherwise loading the implementation class fails as it doesn't have access to the (package) private interface in a different classloader. --- .../data/convert/ClassGeneratingEntityInstantiator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/data/convert/ClassGeneratingEntityInstantiator.java b/src/main/java/org/springframework/data/convert/ClassGeneratingEntityInstantiator.java index 414b45a90..fd8be0861 100644 --- a/src/main/java/org/springframework/data/convert/ClassGeneratingEntityInstantiator.java +++ b/src/main/java/org/springframework/data/convert/ClassGeneratingEntityInstantiator.java @@ -229,10 +229,12 @@ public class ClassGeneratingEntityInstantiator implements EntityInstantiator { } /** + * Needs to be public as otherwise the implementation class generated does not see the interface from the classloader. + * * @author Thomas Darimont + * @author Oliver Gierke */ - private static interface ObjectInstantiator { - + public interface ObjectInstantiator { Object newInstance(Object... args); }