changeset 2144:e026e37b8c0b

[Findbugs] javafx.util.converter.BooleanStringConverter.fromString(String) has Boolean return type and returns explicit null
author jgiles
date Fri, 04 Jan 2013 18:24:15 +1300
parents 7eb6ab4e1510
children 1c7f920c9725
files javafx-util-converter/src/javafx/util/converter/BooleanStringConverter.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-util-converter/src/javafx/util/converter/BooleanStringConverter.java	Fri Jan 04 18:15:15 2013 +1300
+++ b/javafx-util-converter/src/javafx/util/converter/BooleanStringConverter.java	Fri Jan 04 18:24:15 2013 +1300
@@ -37,13 +37,13 @@
     @Override public Boolean fromString(String value) {
         // If the specified value is null or zero-length, return null
         if (value == null) {
-            return null;
+            return Boolean.FALSE;
         }
 
         value = value.trim();
 
         if (value.length() < 1) {
-            return null;
+            return Boolean.FALSE;
         }
 
         return Boolean.valueOf(value);
@@ -53,7 +53,7 @@
     @Override public String toString(Boolean value) {
         // If the specified value is null, return a zero-length String
         if (value == null) {
-            return "";
+            return "false";
         }
 
         return value.toString();