rahulgoswami commented on code in PR #1816:
URL: https://github.com/apache/solr/pull/1816#discussion_r1286246589


##########
solr/core/src/java/org/apache/solr/schema/BoolField.java:
##########
@@ -211,7 +212,7 @@ public List<IndexableField> createFields(SchemaField field, 
Object value) {
   @Override
   public Object toNativeType(Object val) {
     if (val instanceof CharSequence) {
-      return Boolean.valueOf(val.toString());
+      return Boolean.valueOf(StrUtils.parseBoolean(val.toString()));

Review Comment:
   Although I couldn't find evidence that val could be any other implementation 
of CharSequence, I agree with you it's one of those things not worth splitting 
hairs on. And it is definitely worth it being 100% sure rather than 99.99% in 
the interest of everyone's time :) Incorporating the comment.  Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to