fix Calling getClass() on an enum may return a subclass of the enum type (#5594)
ref: https://errorprone.info/bugpattern/GetClassOnEnum
This commit is contained in:
parent
bc64c6a127
commit
3bc94cbb68
|
|
@ -38,7 +38,7 @@ public class AgentServiceRule extends ExternalResource {
|
|||
super.after();
|
||||
try {
|
||||
FieldSetter.setValue(
|
||||
ServiceManager.INSTANCE.getClass(), "bootedServices", new HashMap<Class, BootService>());
|
||||
ServiceManager.INSTANCE.getDeclaringClass(), "bootedServices", new HashMap<Class, BootService>());
|
||||
FieldSetter.setValue(
|
||||
IgnoredTracerContext.ListenerManager.class, "LISTENERS", new LinkedList<TracingContextListener>());
|
||||
FieldSetter.setValue(
|
||||
|
|
|
|||
Loading…
Reference in New Issue