// return new ArrayList<ApplicationVersion>(applicationVersions);
// }
@Override
public List<ApplicationVersion> getApplicationVersions(User user, Long applicationId, SortOrder sortOrder) {
TreeSet<ApplicationVersion> versionsSet = new TreeSet<ApplicationVersion>(new ApplicationVersionComparator());
if (user != null && applicationId != null && applicationId > 0) {
List<ApplicationVersion> returnedVersions = applicationVersionDao.getAllByApplicationForUser(applicationId, user);
if (returnedVersions != null) {
versionsSet.addAll(returnedVersions);
}