From c3561f94d3dd248cd753fda1868bbfff11e47549 Mon Sep 17 00:00:00 2001 From: GordeaS Date: Thu, 25 Jan 2024 10:46:55 +0100 Subject: [PATCH] fix to allow access to private fields of the parent class #EA-3641 --- .../europeana/entitymanagement/definitions/model/Entity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entity-management-definitions/src/main/java/eu/europeana/entitymanagement/definitions/model/Entity.java b/entity-management-definitions/src/main/java/eu/europeana/entitymanagement/definitions/model/Entity.java index 740b52e9..c9db854a 100644 --- a/entity-management-definitions/src/main/java/eu/europeana/entitymanagement/definitions/model/Entity.java +++ b/entity-management-definitions/src/main/java/eu/europeana/entitymanagement/definitions/model/Entity.java @@ -231,6 +231,9 @@ public void setIsShownBy(WebResource resource) { } public Object getFieldValue(Field field) throws IllegalAccessException { + if(!field.canAccess(this)) { + field.setAccessible(true); + } return field.get(this); }