fix npe
This commit is contained in:
parent
912a7046f4
commit
c389721d3e
1 changed files with 11 additions and 5 deletions
|
|
@ -117,11 +117,17 @@ public class DownloadService {
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String prepareRequestURL(DownloadRequest request, LocalDate startDate, LocalDate endDate) {
|
private String prepareRequestURL(DownloadRequest request, LocalDate startDate,
|
||||||
return request.getRequestURL()
|
LocalDate endDate) {
|
||||||
.replace("${startDate}", startDate.toString())
|
String requestURL = request.getRequestURL();
|
||||||
.replace("${endDate}", endDate.toString())
|
|
||||||
.replace("${DB}", request.getSqlConnectionParams().getJdbcDatabase());
|
if (startDate != null) {
|
||||||
|
requestURL = requestURL.replace("${startDate}", startDate.toString());
|
||||||
|
}
|
||||||
|
if (endDate != null) {
|
||||||
|
requestURL = requestURL.replace("${endDate}", endDate.toString());
|
||||||
|
}
|
||||||
|
return requestURL.replace("${DB}", request.getSqlConnectionParams().getJdbcDatabase());
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String[]> executeSqlQuery(Connection connection, String query) throws SQLException {
|
private List<String[]> executeSqlQuery(Connection connection, String query) throws SQLException {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue