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