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


##########
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:
   if "val" is not a String, then there is an avoidable String conversion.  Any 
way, unless someone bothers to benchmark this (which would be a very dubious 
use of anyone's time), we don't know for sure, so feel free to ignore my 
proposal.



-- 
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