if (sone.isLocal()) {
return;
}
- sone.setLatestEdition(fromNullable(tryParse(identity.getProperty("Sone.LatestEdition"))).or(sone.getLatestEdition()));
+ String newLatestEdition = identity.getProperty("Sone.LatestEdition");
+ if (newLatestEdition != null) {
+ Long parsedNewLatestEdition = tryParse(newLatestEdition);
+ if (parsedNewLatestEdition != null) {
+ sone.setLatestEdition(parsedNewLatestEdition);
+ }
+ }
soneDownloader.addSone(sone);
soneDownloaders.execute(soneDownloader.fetchSoneAction(sone));
}