Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
6.1.2
-
Empty show more show less
-
DevX 41
-
0.5
-
Yes
Description
Steps to reproduce
- Use the following test class to demonstrate the ambiguity of param methods in info.magnolia.search.solr.templating.SolrQueryBuilder
public class SolrSearchTest { private SolrQueryBuilder solrQueryBuilder; public SolrSearchTest(SolrQueryBuilder solrQueryBuilder) { super(); this.solrQueryBuilder = solrQueryBuilder; } private void test() { this.solrQueryBuilder.param("this", "is","a","test"); } }
- Â Try to compile
Expected results
Code is correctly compiled
Actual results
There's an error shown in the IDE:
The method param(String, String[]) is ambiguous for the type SolrQueryBuilder
Development notes
Method param is overloaded as follows:
info.magnolia.search.solr.templating.SolrQueryBuilder.param(String, String...) info.magnolia.search.solr.templating.SolrQueryBuilder.param(String, String, String...)
There's no way to distinguish between them as when passing more than 2 Strings any of the methods match in parameters. Fix would be reducing to one single method or changing the method parameters definition (renaming one of them).
Checklists
Acceptance criteria
Attachments
There are no Sub-Tasks for this issue.