Skip to content

Commit b1da500

Browse files
authored
Merge pull request #47 from Nordstrom/pr/support-java-8
Enable execution on Java 8
2 parents d52cdd5 + 9cc02da commit b1da500

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/nordstrom/automation/junit/LifecycleHooks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static <T> T invoke(Object target, String methodName, Object... parameters) {
292292
* @throws NoSuchFieldException if a field with the specified name is not found
293293
* @throws SecurityException if the request is denied
294294
*/
295-
static Field getDeclaredField(Object target, String name) throws NoSuchFieldException, SecurityException {
295+
static Field getDeclaredField(Object target, String name) throws NoSuchFieldException {
296296
Throwable thrown = null;
297297
for (Class<?> current = target.getClass(); current != null; current = current.getSuperclass()) {
298298
try {

src/main/java/com/nordstrom/automation/junit/MutableTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static MutableTest proxyFor(Method testMethod) {
9797
}
9898
if (declared != null) {
9999
try {
100-
Field field = Method.class.getDeclaredField(DECLARED_ANNOTATIONS);
100+
Field field = LifecycleHooks.getDeclaredField(testMethod, DECLARED_ANNOTATIONS);
101101
field.setAccessible(true);
102102
try {
103103
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)