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

Narrow StreamFactory.withFunctionName clazz parameter to prevent misconfiguration.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.3, 7.0
    • Component/s: SolrJ
    • Labels:

      Description

      Currently, StreamFactory has several overloaded withFunctionName methods. One of these, takes two parameters: a String functionName, and a Class implementation type.

      This second parameter is a little too generic, because it's really only ever valid for a small, small subset of classes (i.e. Class<? extends Expressible ). Narrowing the type of this parameter is a small step towards preventing accidental misconfiguration of a StreamFactory.

      1. SOLR-8385.patch
        12 kB
        Kevin Risden
      2. SOLR-8385.patch
        4 kB
        Jason Gerlowski

        Issue Links

          Activity

          Hide
          gerlowskija Jason Gerlowski added a comment -

          Patch. Changes the Type for functionName values from Class to Class<? extends Expressible>, both in method signatures, and internally in StreamFactory.

          All tests pass for me.

          Show
          gerlowskija Jason Gerlowski added a comment - Patch. Changes the Type for functionName values from Class to Class<? extends Expressible> , both in method signatures, and internally in StreamFactory . All tests pass for me.
          Hide
          gerlowskija Jason Gerlowski added a comment -

          This is pretty trivial, both in value and in complexity. If it gets lost because of lack of importance, that's fine with me. Just wanted to give it a bump to make sure it's not getting lost b/c of lack of eyes.

          Show
          gerlowskija Jason Gerlowski added a comment - This is pretty trivial, both in value and in complexity. If it gets lost because of lack of importance, that's fine with me. Just wanted to give it a bump to make sure it's not getting lost b/c of lack of eyes.
          Hide
          risdenk Kevin Risden added a comment -

          Updated patch. Running tests.

          Show
          risdenk Kevin Risden added a comment - Updated patch. Running tests.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6aa28bd6558e47080166bf42b2b97aaa74ebf90b in lucene-solr's branch refs/heads/master from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6aa28bd ]

          SOLR-8385: Narrow StreamFactory.withFunctionName clazz parameter to prevent misconfiguration

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6aa28bd6558e47080166bf42b2b97aaa74ebf90b in lucene-solr's branch refs/heads/master from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6aa28bd ] SOLR-8385 : Narrow StreamFactory.withFunctionName clazz parameter to prevent misconfiguration
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 9ee5569469611bccab7c332fcad3df66d1225202 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9ee5569 ]

          SOLR-8385: Narrow StreamFactory.withFunctionName clazz parameter to prevent misconfiguration

          Show
          jira-bot ASF subversion and git services added a comment - Commit 9ee5569469611bccab7c332fcad3df66d1225202 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9ee5569 ] SOLR-8385 : Narrow StreamFactory.withFunctionName clazz parameter to prevent misconfiguration
          Hide
          risdenk Kevin Risden added a comment -

          Thanks Jason Gerlowski! Sorry for the delay on getting to this.

          Show
          risdenk Kevin Risden added a comment - Thanks Jason Gerlowski ! Sorry for the delay on getting to this.
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Closing after 6.3.0 release.

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

            People

            • Assignee:
              risdenk Kevin Risden
              Reporter:
              gerlowskija Jason Gerlowski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development