diff --git a/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java b/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java index 48dc82619e8..193c89b0ecd 100644 --- a/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java +++ b/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java @@ -44,9 +44,8 @@ public class PageTool { Object docs = response.getResponse(); if (docs != null) { if (docs instanceof DocSlice) { - DocSlice doc_slice = (DocSlice) docs; - results_found = doc_slice.matches(); - start = doc_slice.offset(); + results_found = ((DocSlice) docs).matches(); + start = ((DocSlice) docs).offset(); } else if(docs instanceof ResultContext) { DocList dl = ((ResultContext) docs).getDocList(); results_found = dl.matches(); diff --git a/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java b/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java index 7c7349893f8..d5bc70dc546 100644 --- a/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java +++ b/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java @@ -59,9 +59,8 @@ public class AnalyzeEvaluator extends SimpleEvaluator { if (solrCoreObj == null || !(solrCoreObj instanceof SolrCore) ) { throw new SolrException(SolrException.ErrorCode.INVALID_STATE, "StreamContext must have SolrCore in solr-core key"); } - SolrCore solrCore = (SolrCore) solrCoreObj; - analyzer = solrCore.getLatestSchema().getFieldType(analyzerField).getIndexAnalyzer(); + analyzer = ((SolrCore) solrCoreObj).getLatestSchema().getFieldType(analyzerField).getIndexAnalyzer(); } private void init(String fieldName, String analyzerField) { diff --git a/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java b/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java index 1c266856f15..b4b0669a56a 100644 --- a/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java +++ b/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java @@ -85,8 +85,7 @@ public class ClassifyStream extends TupleStream implements Expressible { if (solrCoreObj == null || !(solrCoreObj instanceof SolrCore) ) { throw new SolrException(SolrException.ErrorCode.INVALID_STATE, "StreamContext must have SolrCore in solr-core key"); } - SolrCore solrCore = (SolrCore) solrCoreObj; - analyzer = solrCore.getLatestSchema().getFieldType(analyzerField).getIndexAnalyzer(); + analyzer = ((SolrCore) solrCoreObj).getLatestSchema().getFieldType(analyzerField).getIndexAnalyzer(); this.docStream.setStreamContext(context); this.modelStream.setStreamContext(context);