Change visibility to protected

This should bypass an issue with the parent class being loaded on a different classloader, resulting in an IllegalAccessError.
This commit is contained in:
Tyler Benson 2017-10-10 16:02:43 -04:00
parent 631d8f196d
commit 33308eff80
2 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,9 @@ public abstract class DDAgentTracingHelper<T> extends OpenTracingHelper {
*/
protected final Tracer tracer;
DDAgentTracingHelper(final Rule rule) {
// This is intentionally protected scope to avoid IllegalAccessError if on separate classloaders:
// https://stackoverflow.com/a/10538366
protected DDAgentTracingHelper(final Rule rule) {
super(rule);
Tracer tracerResolved;
try {

View File

@ -42,6 +42,7 @@ public class DDAgentWriter implements Writer {
/** Scheduled thread pool, acting like a cron */
private final ScheduledExecutorService scheduledExecutor = Executors.newScheduledThreadPool(1);
// FIXME: Properly name these threads to better identify them as ours.
/** Effective thread pool, where real logic is done */
private final ExecutorService executor = Executors.newSingleThreadExecutor();