harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [vmi] Retrieving system properties (was: Re: [classlib][luni] update for bootstrapClassPath causes regression on DRL VM)
Date Wed, 13 Dec 2006 13:51:34 GMT
Alexey Varlamov wrote:
> 2006/12/13, Gregory Shimansky <gshimansky@gmail.com>:
>> Tim Ellison wrote:
>> > Alexey Varlamov wrote:
>> >> Is there any reason to distinguish these cases? I suppose no, then
>> >> returned NULL is fine.
>> >
>> > Maybe we do, i.e. where there is no value "-Dfoobar".  So perhaps we
>> > need to say that GetSystemProperty returns VMI_ERROR_NONE and sets the
>> > the *valuePtr to NULL if there is no value; and returns a
>> > VMI_ERROR_NOT_FOUND if the property is undefined.
>>
>> Now I am confused. What is the difference between a property which has
>> no value and an undefined property?
> 
> Some properties may act as a flag, e.g. -Djava.lang.SecurityManager.
> However, they have empty value in RI (interestingly, DRLVM ignores
> such arguments - must be a bug). So NULL value is still enough to
> indicate no such property is set.

I don't see how we can distinguish such properties in drlvm using just 
one function get_property(const char*, PropertyTable). It either returns 
a valid pointer to the property string value or NULL.

Also empty value in my understanding is still a valid value "".

-- 
Gregory


Mime
View raw message