private static void validateGeneration ( int generation ) { if ( generation == CONTEXT_DEPTH_WARN_THRESH ) { log . log ( Level . SEVERE , "Context ancestry chain length is abnormally long. " + "This suggests an error in application code. " + "Length exceeded: " + CONTEXT_DEPTH_WARN_THRESH , new Exception ( ) ) ; } }
If the ancestry chain length is unreasonably long then print an error to the log and record the stack trace .