On 09/19/2014 01:34 PM, Werner Lehmann wrote:
Hi,

I'd like to use one of the Bindings.select* methods but can't really accept the tons of stderr output it generates for null steps. According to this ticket...

[#RT-35957] Bindings class spits out a lot of unneeded log messages
https://javafx-jira.kenai.com/browse/RT-35957

... 8u20 resolves this by logging on the FINE level. But how can I suppress this output then? As far as I know the platform logger logs to stderr if JDK logging is not used - and we are on log4j. Which means I get FINE logging on stderr which does not help much.

Can you use the platform logger API? Like the following:

        sun.util.logging.PlatformLogger
            .getLogger("bla.bla")
.setLevel(sun.util.logging.PlatformLogger.Level.WARNING);

Regards, Peter


Rgds
Werner

Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
WARNING: Exception while evaluating select-binding [parent, value]
Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue INFO: Property 'value' in ReadOnlyObjectProperty [bean: TreeItem [ value: b ], name: parent, value: null] is null
java.lang.NullPointerException
at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) at com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394)
    at javafx.beans.binding.StringBinding.get(StringBinding.java:152)
at mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182)

//    TreeItem<String> t1 = new TreeItem<String>("a");
    TreeItem<String> t2 = new TreeItem<String>("b");
    TreeItem<String> t3 = new TreeItem<String>("c");

//    t1.getChildren().add(t2);
    t2.getChildren().add(t3);

StringBinding binding = Bindings.selectString(t3, "parent", "parent", "value");
    System.out.println(binding.get());


Reply via email to