You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2014/03/23 18:51:09 UTC

svn commit: r1580553 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/CHANGES.txt solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Author: markrmiller
Date: Sun Mar 23 17:51:08 2014
New Revision: 1580553

URL: http://svn.apache.org/r1580553
Log:
SOLR-5874: Unsafe cast in CloudSolrServer's RouteException. Change RouteException to handle Throwable rather than Exception.
SOLR-5899: CloudSolrServer's RouteResponse and RouteException should be publicly accessible.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1580553&r1=1580552&r2=1580553&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Sun Mar 23 17:51:08 2014
@@ -138,6 +138,12 @@ Bug Fixes
 
 * SOLR-5893: On restarting overseer designate , move itself to front of the queue (Noble Paul)
 
+* SOLR-5874: Unsafe cast in CloudSolrServer's RouteException. Change 
+  RouteException to handle Throwable rather than Exception.
+  (Mark Miller, David Arthur)
+  
+* SOLR-5899: CloudSolrServer's RouteResponse and RouteException should be
+  publicly accessible. (Mark Miller, shalin)
 
 Optimizations
 ----------------------

Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1580553&r1=1580552&r2=1580553&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Sun Mar 23 17:51:08 2014
@@ -311,8 +311,8 @@ public class CloudSolrServer extends Sol
       return null;
     }
 
-    NamedList exceptions = new NamedList();
-    NamedList shardResponses = new NamedList();
+    NamedList<Throwable> exceptions = new NamedList<Throwable>();
+    NamedList<NamedList> shardResponses = new NamedList<NamedList>();
 
     Map<String, LBHttpSolrServer.Req> routes = updateRequest.getRoutes(router, col, urlMap, routableParams, this.idField);
     if (routes == null) {
@@ -453,7 +453,7 @@ public class CloudSolrServer extends Sol
     return condensed;
   }
 
-  class RouteResponse extends NamedList {
+  public static class RouteResponse extends NamedList {
     private NamedList routeResponses;
     private Map<String, LBHttpSolrServer.Req> routes;
 
@@ -475,19 +475,19 @@ public class CloudSolrServer extends Sol
 
   }
 
-  class RouteException extends SolrException {
+  public static class RouteException extends SolrException {
 
-    private NamedList exceptions;
+    private NamedList<Throwable> throwables;
     private Map<String, LBHttpSolrServer.Req> routes;
 
-    public RouteException(ErrorCode errorCode, NamedList exceptions, Map<String, LBHttpSolrServer.Req> routes){
-      super(errorCode, ((Exception)exceptions.getVal(0)).getMessage(), (Exception)exceptions.getVal(0));
-      this.exceptions = exceptions;
+    public RouteException(ErrorCode errorCode, NamedList<Throwable> throwables, Map<String, LBHttpSolrServer.Req> routes){
+      super(errorCode, throwables.getVal(0).getMessage(), throwables.getVal(0));
+      this.throwables = throwables;
       this.routes = routes;
     }
 
-    public NamedList getExceptions() {
-      return exceptions;
+    public NamedList<Throwable> getThrowables() {
+      return throwables;
     }
 
     public Map<String, LBHttpSolrServer.Req> getRoutes() {