lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Parker (JIRA)" <>
Subject [jira] [Commented] (SOLR-9231) SolrInputDocument no-args constructor removed without notice
Date Mon, 20 Jun 2016 19:33:57 GMT


Tim Parker commented on SOLR-9231:

not sure, but...even if it did work, it's not viable for a couple of reasons:

1) this won't work with 6.0.1 - I don't think anyone wants to get into maintaining interface
code full of 'if the Solr version is earlier than 6.1.0, do this...' logic

2) We're calling this from ColdFusion, so it's not trivial to get that specific about types.
 We have built a wrapper class around URLClassLoader, but this shouldn't be burdened with
special cases like "getNewInstanceAndCallConstructorWhichMightTakeArrayOfString()" - nor should
we suddenly have to enumerate through all available constructors looking for one that won't
throw exceptions if called with a zero-sized array

> SolrInputDocument no-args constructor removed without notice
> ------------------------------------------------------------
>                 Key: SOLR-9231
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 6.1
>         Environment: Lucee (or ColdFusion) loading SolrJ using separate URLClassLoader
>            Reporter: Tim Parker
> In 6.0.1 and previous, SolrInputDocument provided two constructors - one with no arguments,
the other accepting a Map object.  As of 6.1.0, the no-arguments constructor is replaced with
one that accepts zero or more strings.
> With 6.0.1, this worked:
> cls = LoadClass("org.apache.solr.common.SolrInputDocument");
> Constructor foo = cls.getConstructor();
> This fails with Solr 6.1.0
> We get the same error after updating the code to this:
> cls = LoadClass("org.apache.solr.common.SolrInputDocument");
> Class[] argArray = new Class[0];
> Constructor foo = cls.getConstructor(argArray);
> Are we missing something?  If not, please restore the missing no-arguments constructor.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message