-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
8u60
-
x86_64
-
linux_ubuntu
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux D31008823 3.2.0-87-generic #125-Ubuntu SMP Fri Jun 19 08:25:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If 2 jvm's change the same PreferenceNode then the changes of the first jvm are lost when the second jvm synces the preferences.
In ./java/util/prefs/FileSystemPreferences.java there is a check if another jvm has changed the
node but I think this check is wrong.
In method sync() there is this code:
if (isUserNode()) {
nmt = userRootModFile.lastModified();
isUserRootModified = userRootModTime == nmt;
I think it should be:
if (isUserNode()) {
nmt = userRootModFile.lastModified();
isUserRootModified = userRootModTime != nmt;
The problem is that the 'isUserRootModified' is used to 'merge' the current state of the PreferenceNode
on the filesystem with the changes made in the jvm. This does not happen due to the above error.
The same goes for isSystemRootModified in the same method
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux D31008823 3.2.0-87-generic #125-Ubuntu SMP Fri Jun 19 08:25:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If 2 jvm's change the same PreferenceNode then the changes of the first jvm are lost when the second jvm synces the preferences.
In ./java/util/prefs/FileSystemPreferences.java there is a check if another jvm has changed the
node but I think this check is wrong.
In method sync() there is this code:
if (isUserNode()) {
nmt = userRootModFile.lastModified();
isUserRootModified = userRootModTime == nmt;
I think it should be:
if (isUserNode()) {
nmt = userRootModFile.lastModified();
isUserRootModified = userRootModTime != nmt;
The problem is that the 'isUserRootModified' is used to 'merge' the current state of the PreferenceNode
on the filesystem with the changes made in the jvm. This does not happen due to the above error.
The same goes for isSystemRootModified in the same method
REPRODUCIBILITY :
This bug can be reproduced always.