From c8152125cd4c0914af721405f6f4d05822ad7085 Mon Sep 17 00:00:00 2001 From: bageshwar <2353296+bageshwar@users.noreply.github.com> Date: Thu, 2 Jun 2022 17:13:09 +0530 Subject: [PATCH] Fix for private members --- .../guicebridge/InjectDataGuiceMembersInjector.java | 1 + .../InjectDataGuiceMembersInjectorTest.java | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tef-impl/src/main/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjector.java b/tef-impl/src/main/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjector.java index b81ceda..5302ca9 100644 --- a/tef-impl/src/main/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjector.java +++ b/tef-impl/src/main/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjector.java @@ -26,6 +26,7 @@ public class InjectDataGuiceMembersInjector implements MembersInjector { public void setField(Field field) { this.field = field; + this.field.setAccessible(true); } public void setInjectionName(String injectionName) { diff --git a/tef-impl/src/test/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjectorTest.java b/tef-impl/src/test/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjectorTest.java index 6918749..ec630d9 100644 --- a/tef-impl/src/test/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjectorTest.java +++ b/tef-impl/src/test/java/flipkart/tef/guicebridge/InjectDataGuiceMembersInjectorTest.java @@ -215,24 +215,24 @@ static class SimpleData { static class SimpleInterface { @InjectData - SimpleData simpleData; + private SimpleData simpleData; @InjectData - Long threadId; + private Long threadId; } static class SimpleInterface2 implements Serializable { @InjectData - SimpleData simpleData; + private SimpleData simpleData; @InjectData - Long threadId; + private Long threadId; } @TefRequestScoped static class SimpleInterface3 { @InjectData - SimpleData simpleData; + private SimpleData simpleData; @InjectData - Long threadId; + private Long threadId; } } \ No newline at end of file