You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2023/08/06 03:11:33 UTC

[GitHub] [solr] dsmiley commented on a diff in pull request #1816: SOLR-16360: Atomic update on boolean fields doesn't reflect when value starts with "1", "t" or "T"

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


##########
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:
   I think you could easily broaden the parameter type of parseBoolean to be CharSequence; then you're not calling val.toString.



-- 
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-unsubscribe@solr.apache.org

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


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