question: private static void checkPackageAccess ( Class type ) { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { String name = type . getName ( ) ; int i = name . lastIndexOf ( '.' ) ; if ( i != - 1 ) { sm . checkPackageAccess ( name . substring ( 0 , i ) ) ; } } }
target:  Check for permission to access the package of the specified class, if any.  Call this method prior to using reflection to access class members to insure that the access check is not skipped because of caller-based checks using ConfigurationFile instead of the caller of ConfigurationFile.