mirror of https://github.com/apache/lucene.git
SOLR-249 -- oh my, missing the "throw" for SolrException!
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@542963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b31cb889b7
commit
7e7b3f765b
|
@ -143,11 +143,11 @@ public class SolrDispatchFilter implements Filter
|
|||
solrReq = parsers.parse( path, req );
|
||||
String qt = solrReq.getParams().get( SolrParams.QT );
|
||||
if( qt != null && qt.startsWith( "/" ) ) {
|
||||
new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Invalid query type. Do not use /select to access: "+qt);
|
||||
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Invalid query type. Do not use /select to access: "+qt);
|
||||
}
|
||||
handler = core.getRequestHandler( qt );
|
||||
if( handler == null ) {
|
||||
new SolrException( SolrException.ErrorCode.BAD_REQUEST, "unknown handler: "+qt);
|
||||
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "unknown handler: "+qt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public class SolrRequestParsers
|
|||
String[] strs = params.getParams( SolrParams.STREAM_URL );
|
||||
if( strs != null ) {
|
||||
if( !enableRemoteStreams ) {
|
||||
new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Remote Streaming is disabled." );
|
||||
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Remote Streaming is disabled." );
|
||||
}
|
||||
for( final String url : strs ) {
|
||||
ContentStreamBase stream = new ContentStreamBase.URLStream( new URL(url) );
|
||||
|
@ -132,7 +132,7 @@ public class SolrRequestParsers
|
|||
strs = params.getParams( SolrParams.STREAM_FILE );
|
||||
if( strs != null ) {
|
||||
if( !enableRemoteStreams ) {
|
||||
new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Remote Streaming is disabled." );
|
||||
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Remote Streaming is disabled." );
|
||||
}
|
||||
for( final String file : strs ) {
|
||||
ContentStreamBase stream = new ContentStreamBase.FileStream( new File(file) );
|
||||
|
@ -303,7 +303,7 @@ class MultipartRequestParser implements SolrRequestParser
|
|||
final HttpServletRequest req, ArrayList<ContentStream> streams ) throws Exception
|
||||
{
|
||||
if( !ServletFileUpload.isMultipartContent(req) ) {
|
||||
new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Not multipart content! "+req.getContentType() );
|
||||
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Not multipart content! "+req.getContentType() );
|
||||
}
|
||||
|
||||
MultiMapSolrParams params = SolrRequestParsers.parseQueryString( req.getQueryString() );
|
||||
|
|
Loading…
Reference in New Issue