What steps will reproduce the problem?
1. create a class with a non-public constructor
2. call Reflections.getConstructorsAnnotatedWith on that class
What is the expected output? What do you see instead?
java.lang.NoSuchMethodException: ClassWithNonpublicConstructor.<init>()
at java.lang.Class.getConstructor0(Class.java:2892)
at java.lang.Class.getConstructor(Class.java:1723)
at org.reflections.util.Utils.getMemberFromDescriptor(Utils.java:83)
What version of the product are you using? On what operating system?
0.9.9-RC1 (since 0.9.9 has an unrelated problem)
The patch is simple:
Utils.java:
- return aClass.getConstructor(parameterTypes);
+ return aClass.getDeclaredConstructor(parameterTypes);
Original issue reported on code.google.com by ril...@novomind.com on 26 Feb 2015 at 2:40
Original issue reported on code.google.com by
ril...@novomind.com
on 26 Feb 2015 at 2:40