RFR: 7903300: Add test library support to jtreg plugin [v2]

Guoxiong Li gli at openjdk.org
Thu Sep 15 18:16:01 UTC 2022


On Thu, 15 Sep 2022 15:02:35 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Bump the version and revise notes.
>>  - Adjust the api name. Fix the possible NPE and remove duplicated entries.
>
> plugins/idea/src/main/java/com/oracle/plugin/jtreg/util/JTRegUtils.java line 352:
> 
>> 350:      * Create (if not existing) and get the jtreg project library.
>> 351:      */
>> 352:     public static Library createJTRegLibrary(Project project, String oldDir, String newDir) {
> 
> Wouldn't it be better to split this into a function that creates the library, and one that updates it? I find it odd that the file listener is calling this with oldDir == newDir. Maybe just add option for oldDir to be null, so that we only drop the old root if one is given?

I adjusted the api, added `update` method and delegated the `create` method to it. And I also fixed the possible NPE and avoided the duplicated lib entries.

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

PR: https://git.openjdk.org/jtreg/pull/117


More information about the jtreg-dev mailing list