JDK-8177325 : Caller sensitive methods Logger.getLogger, Logger.getAnonymousLogger, will throw NPE if there is no caller on the stack.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 6,7,8,9
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2017-03-21
  • Updated: 2022-02-02
  • Resolved: 2022-02-02
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Caller sensitive methods Logger.getLogger, Logger.getAnonymousLogger currently throw an undocumented NullPointerException if they are called from JNI and there is no Java frame on the stack.
Comments
Workaround: use an auxiliary class in order to call Logger.getLogger instead of calling Logger::getLogger directly from JNI.
21-03-2017