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:
Kdump 2020-09-30 22:51:05 +08:00 committed by GitHub
parent bc64c6a127
commit 3bc94cbb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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(