When using methods such as max(...), min(...) in AggregationClient， we will pass Scan as parameter. These methods will throw NullPointerException if users invoke scan.setStartRow(null) or scan.setStopRow(null) before passing the scan as parameter. The NullPointerException is thrown by validateParameters(Scan scan) which will be invoked before sending requests to server. The implementation of validateParameters is :
“Bytes.equals(scan.getStartRow(), HConstants.EMPTY_START_ROW)” will throw NullPointerException if the startRow of scan is set to null.