Commits

Alek Mierzwicki committed 1049725

JRADEV-14859 Fixed NoSuchFieldError. Changed version to 0.2.1

  • Participants
  • Parent commits 2270e0c

Comments (0)

Files changed (2)

 
 	<groupId>com.atlassian.jira</groupId>
 	<artifactId>jira-nimble-func-tests</artifactId>
-	<version>0.3-SNAPSHOT</version>
+	<version>0.2.1-SNAPSHOT</version>
 	<packaging>jar</packaging>
 
 	<name>JIRA Nimble Functional Tests</name>

src/main/java/com/atlassian/jira/nimblefunctests/framework/NimbleFuncTestCase.java

 import org.junit.Rule;
 import org.junit.rules.TestName;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
 /**
 			ftc.parse = this.parse;
 			try {
 				// type of log field has changed (package refactor) - we need to get this field by name
-				ftc.log = new FuncTestLogger(this.getClass().getField("log").get(this));
+				final Field logField = this.getClass().getSuperclass().getDeclaredField("log");
+				logField.setAccessible(true);
+				ftc.log = new FuncTestLogger(logField.get(this));
 			} catch (Exception e) {
 				throw new RuntimeException(e);
 			}