Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9161

SolrPluginUtils.invokeSetters should accommodate setter variants

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 6.2, 7.0
    • None
    • None

    Description

      The code currently assumes that there is only one setter (or if there are several setters then the first one found is used and it could mismatch on the arg type).

      Context and motivation is that a class with a

      void setAFloat(float val) {
        this.val = val;
      }
      

      setter may wish to also provide a

      void setAFloat(String val) {
        this.val = Float.parseFloat(val);
      }
      

      convenience setter.

      Attachments

        1. SOLR-9161.patch
          4 kB
          Christine Poerschke
        2. SOLR-9161.patch
          4 kB
          Christine Poerschke

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: