On Thu, 28 Aug 2025 14:51:14 GMT, Mikhail Yankelevich <myankelev...@openjdk.org> wrote:
>> I think it's a matter of personal preference, I usually use just >> `runAndCheckException` in tests. In the production code I prepend the class >> name to static methods. I wonder if there are any coding style >> recommendations about it? > > I agree, this is a preference thing. A few style guides: > * Google style guide > https://google.github.io/styleguide/javaguide.html#s6.3-static-members says > to call with the class name. > * But on the other hand Oracle one says it's ok (10.2) > https://www.oracle.com/java/technologies/javase/codeconventions-programmingpractices.html > > Overall, I asked for it, as I think almost all instances of usage of this > method in the tests are with `Utils` and it's a bit hard to see where this > method is coming from. But I'm ok if you want to keep it as is I see, thanks! I think both documents actually just instruct to avoid using a class object to access a class (static) variable. Notice `When a reference to a static class member must be qualified` condition in the first doc. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26970#discussion_r2307693816