SOLR-13086 improve error message in DocumentObjectBinder

This commit is contained in:
Gus Heck 2018-12-31 07:54:56 -05:00
parent 6a2de771bf
commit 752989fd74
2 changed files with 7 additions and 1 deletions

View File

@ -143,6 +143,8 @@ Other Changes
* SOLR-12535: Solr no longer accepts index time boosts in JSON provided to Solr. (David Smiley)
* SOLR-13086: Improve the error message reported by DocumentObjectBinder when a setter is not found (Gus Heck)
================== 7.7.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
@ -228,6 +230,9 @@ Other Changes
* SOLR-12727: Upgrade ZooKeeper dependency to 3.4.13 (Kevin Risden, Erick Erickson, Cao Manh Dat)
* SOLR-13086: Improve the error message reported by DocumentObjectBinder when a setter is not found (Gus Heck)
================== 7.6.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -232,7 +232,8 @@ public class DocumentObjectBinder {
} else {
Class[] params = setter.getParameterTypes();
if (params.length != 1) {
throw new BindingException("Invalid setter method. Must have one and only one parameter");
throw new BindingException("Invalid setter method (" + setter +
"). A setter must have one and only one parameter but we found " + params.length + " parameters.");
}
type = params[0];
}