satanson commented on a change in pull request #503: HBASE-22870 reflection fails to access a private nested class URL: https://github.com/apache/hbase/pull/503#discussion_r314933949
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java ########## @@ -3906,7 +3906,7 @@ public boolean isShutDown() { /** * Force to terminate region server when abort timeout. */ - private static class SystemExitWhenAbortTimeout extends TimerTask { + public static class SystemExitWhenAbortTimeout extends TimerTask { Review comment: ok, good suggest, setAccessible return void, so should write like this ``` Constructor<? extends TimerTask> timerTaskCtor = Class.forName(conf.get(ABORT_TIMEOUT_TASK, SystemExitWhenAbortTimeout.class.getName())) .asSubclass(TimerTask.class).getDeclaredConstructor(); timerTaskCtor.setAccessible(true); abortTimeoutTask = timerTaskCtor.newInstance(); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services