You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by eh...@apache.org on 2011/10/27 14:31:50 UTC

svn commit: r1189719 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java

Author: ehatcher
Date: Thu Oct 27 12:31:49 2011
New Revision: 1189719

URL: http://svn.apache.org/viewvc?rev=1189719&view=rev
Log:
Fix exception message typo and remove duplicate strings

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java?rev=1189719&r1=1189718&r2=1189719&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java Thu Oct 27 12:31:49 2011
@@ -345,19 +345,17 @@ public class DocumentAnalysisRequestHand
    */
   private ContentStream extractSingleContentStream(SolrQueryRequest req) {
     Iterable<ContentStream> streams = req.getContentStreams();
+    String exceptionMsg = "DocumentAnalysisRequestHandler expects a single content stream with documents to analyze";
     if (streams == null) {
-      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-              "DocumentAnlysisRequestHandler expects a single content stream with documents to analyze");
+      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, exceptionMsg);
     }
     Iterator<ContentStream> iter = streams.iterator();
     if (!iter.hasNext()) {
-      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-              "DocumentAnlysisRequestHandler expects a single content stream with documents to analyze");
+      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, exceptionMsg);
     }
     ContentStream stream = iter.next();
     if (iter.hasNext()) {
-      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-              "DocumentAnlysisRequestHandler expects a single content stream with documents to analyze");
+      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, exceptionMsg);
     }
     return stream;
   }