You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gu...@apache.org on 2018/12/31 13:17:22 UTC

lucene-solr:master: SOLR-13086 improve error message in DocumentObjectBinder

Repository: lucene-solr
Updated Branches:
  refs/heads/master 6a2de771b -> 752989fd7


SOLR-13086 improve error message in DocumentObjectBinder


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/752989fd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/752989fd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/752989fd

Branch: refs/heads/master
Commit: 752989fd74300fb115e64732fc0ca8aac0c1c44d
Parents: 6a2de77
Author: Gus Heck <gu...@needhamsoftware.com>
Authored: Mon Dec 31 07:54:56 2018 -0500
Committer: Gus Heck <gu...@needhamsoftware.com>
Committed: Mon Dec 31 07:54:56 2018 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt                                                | 5 +++++
 .../apache/solr/client/solrj/beans/DocumentObjectBinder.java    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/752989fd/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 88f9b70..17bf849 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/752989fd/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
index e2e65bb..2e78093 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
@@ -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];
       }