Skip to content

Commit

Permalink
HBASE-22870 reflection fails to access a private nested class
Browse files Browse the repository at this point in the history
Signed-off-by Reid Chan <reidchan@apache.org>
  • Loading branch information
satanson authored and Reidddddd committed Aug 18, 2019
1 parent 836f269 commit 7697d48
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2475,9 +2475,11 @@ private void scheduleAbortTimer() {
this.abortMonitor = new Timer("Abort regionserver monitor", true);
TimerTask abortTimeoutTask = null;
try {
abortTimeoutTask =
Constructor<? extends TimerTask> timerTaskCtor =
Class.forName(conf.get(ABORT_TIMEOUT_TASK, SystemExitWhenAbortTimeout.class.getName()))
.asSubclass(TimerTask.class).getDeclaredConstructor().newInstance();
.asSubclass(TimerTask.class).getDeclaredConstructor();
timerTaskCtor.setAccessible(true);
abortTimeoutTask = timerTaskCtor.newInstance();
} catch (Exception e) {
LOG.warn("Initialize abort timeout task failed", e);
}
Expand Down

0 comments on commit 7697d48

Please sign in to comment.