Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbacf27 commit e633b54Copy full SHA for e633b54
1 file changed
agent/src/test/java/com/cloud/agent/AgentTest.java
@@ -33,7 +33,6 @@
33
34
import java.io.IOException;
35
import java.lang.reflect.Field;
36
-import java.lang.reflect.Modifier;
37
import java.net.InetSocketAddress;
38
39
import javax.naming.ConfigurationException;
@@ -75,9 +74,6 @@ public void testGetLinkLogLinkWithTraceEnabledReturnsLinkLogWithHashCode() throw
75
74
// fix LOGGER access to inject mock
76
Field field = link.getClass().getDeclaredField("LOGGER");
77
field.setAccessible(true);
78
- Field modifiersField = Field.class.getDeclaredField("modifiers");
79
- modifiersField.setAccessible(true);
80
- modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
81
field.set(null, logger);
82
when(logger.isTraceEnabled()).thenReturn(true);
83
0 commit comments