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

Jorn Vernee jvernee at openjdk.org
Mon Mar 10 14:24:26 UTC 2025


On Mon, 10 Mar 2025 13:33:42 GMT, Oleksii Sylichenko <duke at openjdk.org> wrote:

>> On the other hand, a file element could produce null for `getVirtualFile()`:
>> 
>> ![image](https://github.com/user-attachments/assets/15dcfd4b-7b87-4387-a0e8-440d65fff0e7)
>> 
>> ok, I will add check there
>
> 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)

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

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


More information about the jtreg-dev mailing list