You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AndroidInstrumentationRegistryImpl seems like it's intended to ONLY encapsulate the auto-discovered instrumentations available on the classpath. Even though internal, having a register() method is slightly confusing (it's unclear when that should/could be used). Furthermore, it appears that any interactions with the registry (get() or getAll()) will cause the lazy field to be initialized, which will load instrumentation classes. Depending on the configuration, this may not be what users expect, and at worst could have side effects if instrumentations are behaving poorly during construction.
Propose removing register() from the registry and renaming the registry to something like AutodetectedClasspathInstrumentations, and only calling get() or getAll() when the configuration has discoverInstrumenations = TRUE.
The text was updated successfully, but these errors were encountered:
This is a follow-up from this comment.
The
AndroidInstrumentationRegistryImpl
seems like it's intended to ONLY encapsulate the auto-discovered instrumentations available on the classpath. Even thoughinternal
, having aregister()
method is slightly confusing (it's unclear when that should/could be used). Furthermore, it appears that any interactions with the registry (get()
orgetAll()
) will cause the lazy field to be initialized, which will load instrumentation classes. Depending on the configuration, this may not be what users expect, and at worst could have side effects if instrumentations are behaving poorly during construction.Propose removing
register()
from the registry and renaming the registry to something likeAutodetectedClasspathInstrumentations
, and only callingget()
orgetAll()
when the configuration hasdiscoverInstrumenations = TRUE
.The text was updated successfully, but these errors were encountered: