Do not use the SecurityManager removed methods

The following methods are not available in Java SE 11:

The removed methods should be replaced with calls to the java.lang.SecurityManager.checkPermission method. Along with the methods listed earlier the java.lang.SecurityManager.inCheck data field was removed.

For SecurityManager Javadoc, see Class SecurityManager. For more information on Java SE 11 changes, see Removed APIs in JDK 11.