Community
Participate
Working Groups
Created attachment 284175 [details] Project that shows the bahvior The code below always prints "node /fails does not exist". The flush is accepted, no errors are thrown and the javadoc does not state anywhere that this construct is not valid. See attached project. This project must be set to autostart in the run config. Preferences root = Platform.getPreferencesService().getRootNode(); Preferences testnode; if (!root.nodeExists("fails")) { System.out.println("node /fails does not exist"); } testnode = root.node("test"); System.out.println(testnode.get("key", "fails")); testnode.put("key", "works"); System.out.println(testnode.get("key", "fails")); testnode.flush();
Created attachment 284176 [details] Project that shows the behavior
Apologies, there was a bug in my bug report. The code below always prints "node /fails does not exist". The flush is accepted, no errors are thrown and the javadoc does not state anywhere that this construct is not valid. See attached project. This project must be set to autostart in the run config. Preferences root = Platform.getPreferencesService().getRootNode(); Preferences testnode; if (!root.nodeExists("fails")) { System.out.println("node /fails does not exist"); } testnode = root.node("test"); System.out.println(testnode.get("key", "fails")); testnode.put("key", "works"); System.out.println(testnode.get("key", "fails")); testnode.flush();
3rd time. Apologies for the spam. The code below always prints "node /fails does not exist". The flush is accepted, no errors are thrown and the javadoc does not state anywhere that this construct is not valid. See attached project. This project must be set to autostart in the run config. Preferences root = Platform.getPreferencesService().getRootNode(); Preferences testnode; if (!root.nodeExists("fails")) { System.out.println("node /fails does not exist"); } testnode = root.node("fails"); <--- System.out.println(testnode.get("key", "fails")); testnode.put("key", "works"); System.out.println(testnode.get("key", "fails")); testnode.flush();