toRevision cannot reasonably be null, as it already is an Optional,
hence the check here is incorrect and should instead check for
non-presence.
Change-Id: I93658ce5993aed1a02f4ad25121e11b3f31d356a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
}
// If revision is not specified in import, but module exists with different revisions, take first one
- if (toRevision == null) {
+ if (!toRevision.isPresent()) {
final Map<Optional<Revision>, ModuleNodeImpl> modulerevs = moduleGraph.row(toName);
if (!modulerevs.isEmpty()) {