I doubt there is any significant reason for it other than the default is based on the OS and the native might have been an easy decision point.
Moving it to Java code is probably fine - the code just needs to use a default based on the OS. -Nathan On Tue, Dec 30, 2008 at 4:25 AM, Regis <[email protected]> wrote: > Hi, > > The provider of prefs is controlled by the property > "java.util.prefs.PreferencesFactory" in Harmony, and we also have different > default values for it on Linux and Windows, but the default values are set > in luni module at modules/luni/src/main/native/luni/shared/luniglob.c, > are there any special concerns that we must do it in luni native code? Or is > it possible set it in prefs module with java code, like this: > > if (factoryClassName == null) { > if (isWindows) { > factoryClassName = > "java.util.prefs.RegistryPreferencesFactoryImpl"; > } else { > factoryClassName = > "java.util.prefs.FilePreferencesFactoryImpl"; > } > } > > I think there must be a way to get current platform at runtime in java. > > -- > Best Regards, > Regis. >
