RFR: 7903965: Fix Launching Tests from Context Menu [v4]

Oleksii Sylichenko duke at openjdk.org
Mon Mar 10 16:50:09 UTC 2025


On Mon, 10 Mar 2025 14:19:27 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Added `null` check for the file-case: 3a3f10197c0670da4489d13b66cbabca10873b77
>> 
>> I will check if `JTRegDirectoryConfigurationProducer` is needed.
>
> I'm not talking about `getVirtualFile`, I'm talking about the call to `getContainingFile`, inside `nameForElement`. If `element` is a `PsiDirectory`, then `getContainingFile` will return `null` (looking at the impl in `PsiDirectoryImpl`): 
> ![image](https://github.com/user-attachments/assets/1199772b-c6c0-429e-9db9-5872c048c921)

Ok, so the `JTRegDirectoryConfigurationProducer` class is not needed because directory processing will be handled by the 'class producer', and I will take care of additional `null` checks.

Therefore, we don't need `JTRegClassConfigurationProducer` as the only child of `JTRegConfigurationProducer`, so I propose moving all its code to the parent class and removing it as well.

Would that be okay?

-------------

PR Review Comment: https://git.openjdk.org/jtreg/pull/252#discussion_r1987670957


More information about the jtreg-dev mailing list