<Swing Dev> <AWT Dev> [9] Review Request for 8056991: Provide OSInfo functionality to regression tests

Yuri Nesterenko yuri.nesterenko at oracle.com
Mon Sep 15 11:21:00 UTC 2014


Thank you Alexander!

I hope I may push it with your single review:
the change is in test area and seems virtually harmless.

Cheers,
-yan

On 09/15/2014 03:13 PM, Alexander Scherbatiy wrote:
>
>    The fix looks good to me.
>
>   Thanks,
>   Alexandr.
>
> On 9/15/2014 3:00 PM, Yuri Nesterenko wrote:
>> On 09/15/2014 02:42 PM, Alexander Scherbatiy wrote:
>>>
>>> test/lib/testlibrary/jdk/testlibrary/OSInfo.java
>>> 32 import static jdk.testlibrary.OSInfo.OSType.*;
>>>
>>> Is this import necessary?
>> Yes: many tests use enum without qualification -- it's
>> short and presumably elegant. Without this import
>> usage like OSInfo.OSType.WINDOWS is necessary (see an
>> example of changed test in this webrev).
>>
>>>
>>>   115     public static PrivilegedAction<OSType> getOSTypeAction() {
>>>   116         return osTypeAction;
>>>   117     }
>>>
>>> Is this method used in the tests?
>> Well, no. Almost never. This method of sun.awt.OSInfo is in use
>> in Swing classes.
>> I'm retaining it because (1) no harm in it and (2) this way,
>> it would be much simpler to maintain a duplicate of
>> sun.awt.OSInfo in case of a change.
>>
>> -yan
>>
>>>
>>> Thanks,
>>> Alexandr.
>>>
>>> On 9/15/2014 11:35 AM, Yuri Nesterenko wrote:
>>>> Dear friends, one more weekly reminder!
>>>> Without this (or similar) fix applied, we cannot start changes of
>>>> ~60 regtests, and time is short.
>>>>
>>>> Cheers,
>>>> -yan
>>>>
>>>> On 09/08/2014 01:09 PM, Yuri Nesterenko wrote:
>>>>> Weekly reminder!
>>>>>
>>>>> Cheers,
>>>>> -yan
>>>>>
>>>>> On 09/01/2014 12:44 PM, Yuri Nesterenko wrote:
>>>>>> Colleagues,
>>>>>>
>>>>>> please review this minimal change to fix
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8056991
>>>>>>
>>>>>> http://cr.openjdk.java.net/~yan/8056991/webrev.00
>>>>>>
>>>>>> In the webrev there is an example of a test refactored.
>>>>>>
>>>>>> We need to clean up regression tests from internal
>>>>>> dependencies. One of them, dependency on sun.awt.OSInfo.java, a
>>>>>> standard (however internal) tool to provide a version
>>>>>> of current OS.
>>>>>> Here, I'm just copying the file to a test helper directory.
>>>>>> (1) no swing library class depending on OSInfo will be affected
>>>>>> (2) no public API change occurs
>>>>>> A person updating sun.awt.OSInfo in future should, however,
>>>>>> duplicate changes in this test copy as well which is an ugly
>>>>>> compromise.
>>>>>>
>>>>>> Thanks,
>>>>>> -yan
>>>>>
>>>>
>>>
>>
>




More information about the swing-dev mailing list