Code review: 7126979 (props) JCK test java_lang/System/GetProperties.java failing [macosx]
Michael McMahon
michael.x.mcmahon at oracle.com
Wed Jan 18 18:06:56 UTC 2012
On 12/01/12 13:02, David Holmes wrote:
> On 12/01/2012 10:49 PM, Michael McMahon wrote:
>> Thanks David. Just found it now (Alan noticed it too). Scott sent his
>> webrev yesterday.
>>
>> It looks like both solutions fix the problem. The difference is that
>> Scott's re-initializes
>> the properties from native code each time System.initProperties() is
>> called.
>> On the other platforms, we only call it once.
>>
>> So, do we want Macos to diverge slightly from the other platforms in
>> this respect?
>
> I haven't compared things in detail but If there is no need to diverge
> then I would not diverge.
>
I've discussed this with Scott and we're agreed we will go with the
minimal change to the shared
code to begin with. I have created a CR (7131142) to track providing
what the Apple code did
originally, which was that it dynamically updates the system proxy
properties. The best way
to do this is through the DefaultProxySelector class rather than in the
common property initialization
code though.
- Michael.
> David
> -----
>
>> My preference is to keep the platforms as similar as possible,
>> minimising the changes
>> with jdk7u ...
>>
>> - Michael.
>>
>> On 12/01/12 11:52, David Holmes wrote:
>>> Michael,
>>>
>>> There was a different patch for this posted earlier today where the
>>> props fields were all nulled out so they didn't reference the freed
>>> locations amy more. (I didn't keep the email)
>>>
>>> ???
>>>
>>> David
>>>
>>> On 12/01/2012 9:22 PM, Michael McMahon wrote:
>>>> Could I get the following change for jdk7u-osx reviewed please?
>>>>
>>>> http://cr.openjdk.java.net/~michaelm/7126979/webrev.1/
>>>>
>>>> The freeProps() call added by mac port can only be called once. Issue
>>>> seen if System.setProperties(null) is called.
>>>> GetJavaProperties() called a second time, which is supposed to return
>>>> the statically populated information
>>>> from first call. But some of it has been freed already.
>>>>
>>>> Fix is to remove the freeProps() code added in the original port
>>>> changeset. The fix reverts the mac specific code
>>>> to the original version.
>>>>
>>>> - Michael
>>>>
>>
More information about the core-libs-dev
mailing list