As said in the name, DatasetService::getLastUploadForDataset throws NullPointerException in case no loads were performed yet.
The code tries to check if lastUploadUri is not empty
isEmpty(dataSet.getLastUploadUri())
but getLastUploadUri method actually returns lastUpload.uri of Dataset class. So when there were no uploads at all, lastUpload field is null and lastUpload.uri throws NPE
As said in the name,
DatasetService::getLastUploadForDatasetthrowsNullPointerExceptionin case no loads were performed yet.The code tries to check if
lastUploadUriis not emptybut
getLastUploadUrimethod actually returnslastUpload.uriofDatasetclass. So when there were no uploads at all,lastUploadfield isnullandlastUpload.urithrows NPE