On Mon, 23 Sep 2024 09:39:00 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> We use "no caller class" in the CS methods, maybe it could be improved. >> >> I think "can not be determined" just begs questions. Is this a JDK >> limitation, something I'm doing wrong, or something else, ... if you see >> what I mean. > > It is documented by the CS JEP: https://openjdk.org/jeps/176 > >> It discovers its caller's class by invoking the >> sun.reflect.Reflection.getCallerClass method. > > CS set the precedent here and the terminology. > I think "can not be determined" just begs questions. Is this a JDK > limitation, something I'm doing wrong, or something else, ... if you see what > I mean. I think saying 'no caller class on the stack' has the same effect though, unless someone knows how the implementation works (which may not be unreasonable), and is aware of the scenario where a java method is called from a new native thread. I thought it would look cleaner to have this be more 'explicitly unspecified' instead. But, maybe having something (vague or not), is better than nothing... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21067#discussion_r1771253876