Skip to content

DatasetService::getLastUploadForDataset throws NPE if there were no uploads yet #1085

Description

@leostep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions