-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b164
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8178257 | 10 | Daniel Fuchs | P2 | Resolved | Fixed | b04 |
When there is no java frame on the stack, then the caller information cannot be obtained and there is not enough context to know which module would be appropriate in this case.
The NullPointerException should be documented - or another more specific exception should be thrown (and documented) in this case.
Note: should a JNI attached thread need to obtain a System::Logger it can do so by two other means:
a) use an auxiliary class that will implicitly be identified as the caller. The module given to the LoggerFinder will then be the auxillary class module.
or b) access the system LoggerFinder instance (LoggerFinder.getLoggerFinder()) and obtain a logger from it.
Note however that b) may force the eager initialization of the underlying logging system.
- backported by
-
JDK-8178257 Caller sensitive method System::getLogger should specify what happens if there is no caller on the stack.
- Resolved
- duplicates
-
JDK-8177325 Caller sensitive methods Logger.getLogger, Logger.getAnonymousLogger, will throw NPE if there is no caller on the stack.
- Closed
- relates to
-
JDK-8177155 Examine @CS methods when called from attached thread with no caller
- Resolved
-
JDK-8177036 Class.checkMemberAccess throws NPE when calling Class methods via JNI
- Closed
-
JDK-8177325 Caller sensitive methods Logger.getLogger, Logger.getAnonymousLogger, will throw NPE if there is no caller on the stack.
- Closed