I was pondering, playing around with some code. I came across the following method in the Thread class: checkAccess().
The documentation (literally) says “Does nothing.” Why would this possibly be in the Thread class if it does nothing? – Are we possibly dealing with developer trolls?
Screenshot:

Thread.checkAccess()is from core Java APIs so that’s why it exists inAndroidas well, however it is not implemented.Android’s java.lang.Thread.checkAccess() doesn’t provide this implementation because it is not trusting SecurityManagers.
And this is how
Thread.checkAccessis implemented inside OpenJDK.