Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3174

Allow non-String values in environment configuration

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.8.Final, 5.7.3.Final, 5.6.4.Final, 5.9.1.Final, 5.10.0.Final
    • Fix Version/s: 6.0.0.Alpha2
    • Component/s: engine
    • Labels:
      None

      Description

      Hi there,

      while trying to use

      properties.put(Environment.INDEX_UNINVERTING_ALLOWED, true);
      

      I have discovered that

      org.hibernate.search.util.configuration.impl.ConfigurationParseHelper#getBooleanValue
      

      uses

      Properties.getProperty
      

      which returns null when the property value is not a string (for whatever reason...).

      In my case, this has the effect that using a boolean "true" INDEX_UNINVERTING_ALLOWED is not recognized and an exception is thrown instead as this is now the default. Using a string based

      properties.put(Environment.INDEX_UNINVERTING_ALLOWED,"true");
      

      IMHO, this is a pitfall that could be easily avoided by also allowing boolean values.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                nikowitt Niko Wittenbeck
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: