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:46:24 UTC
svn commit: r1580550 - in /lucene/dev/trunk/solr: CHANGES.txt
solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Author: markrmiller
Date: Sun Mar 23 17:46:23 2014
New Revision: 1580550
URL: http://svn.apache.org/r1580550
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/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1580550&r1=1580549&r2=1580550&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sun Mar 23 17:46:23 2014
@@ -194,6 +194,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/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1580550&r1=1580549&r2=1580550&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Sun Mar 23 17:46:23 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() {