mirror of https://github.com/apache/lucene.git
let SolrQuery take null start/rows to remove them (rather then throw NPE)
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@609854 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b80c55ebb4
commit
2a074e6dc1
|
@ -372,7 +372,12 @@ public class SolrQuery extends ModifiableSolrParams
|
|||
}
|
||||
|
||||
public void setRows(Integer rows) {
|
||||
this.set(CommonParams.ROWS, rows);
|
||||
if( rows == null ) {
|
||||
this.remove( CommonParams.ROWS );
|
||||
}
|
||||
else {
|
||||
this.set(CommonParams.ROWS, rows);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getRows()
|
||||
|
@ -390,7 +395,12 @@ public class SolrQuery extends ModifiableSolrParams
|
|||
// }
|
||||
|
||||
public void setStart(Integer start) {
|
||||
this.set(CommonParams.START, start);
|
||||
if( start == null ) {
|
||||
this.remove( CommonParams.START );
|
||||
}
|
||||
else {
|
||||
this.set(CommonParams.START, start);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getStart()
|
||||
|
|
Loading…
Reference in New Issue