Geir Magnusson Jr. wrote: > Right - the thing I was asking if the behavior of GetSystemProperty() > changed. > > Looking at Ollie's change in r486100, he seems to think that it's not an > error to not have the property set, but our impl of it does. > > That's the issue I'm trying to get to - does the API of > GetSystemProperty() specify that it returns an error code if the > property isn't set? > > If so, then Ollie's code is wrong. If not, then it's either that the > API is ambiguous (Ollie's assumption wasn't unreasonable) or our impl of > GetSystemProperty() is wrong.
I agree that the API needs further definition, so I propose the following clarification: Index: modules/luni/src/main/native/include/shared/vmi.h =================================================================== --- modules/luni/src/main/native/include/shared/vmi.h (revision 486224) +++ modules/luni/src/main/native/include/shared/vmi.h (working copy) @@ -220,7 +220,7 @@ /** * @fn VMInterfaceFunctions_::GetSystemProperty(VMInterface * vmi, char *key, char **valuePtr) - * Retrieve the value of a VM system property. + * Retrieve the value of a VM system property. If the property is not set returns NULL. * * @note The returned string is owned by the VM, and should not be freed. */ Regards, Tim