Skip to content

Commit b4f2b46

Browse files
author
cogmission
committed
Fix for mismatch between ScalarEncoder signature type of Double and the decode result of Booleans in FieldMetaType
1 parent df0d653 commit b4f2b46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/numenta/nupic/FieldMetaType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public <T> T decodeType(String input, Encoder<?> enc) {
9696
case LIST :
9797
case STRING : return (T)input;
9898
case DATETIME : return (T)((DateEncoder)enc).parse(input);
99-
case BOOLEAN : return (T)(Boolean.valueOf(input) == true ? new Integer(1) : new Integer(0));
99+
case BOOLEAN : return (T)(Boolean.valueOf(input) == true ? new Double(1) : new Double(0));
100100
case COORD :
101101
case GEO : {
102102
String[] parts = input.split("[\\s]*\\;[\\s]*");

0 commit comments

Comments
 (0)