Fix return value.
This commit is contained in:
parent
5bcf0ba051
commit
6ef4c2aaa2
1 changed files with 2 additions and 2 deletions
|
|
@ -118,14 +118,14 @@ public class VmExtraData {
|
|||
if (addr.isEmpty()) {
|
||||
logger
|
||||
.severe(() -> "Failed to find display IP for " + vmDef.name());
|
||||
return null;
|
||||
return Optional.empty();
|
||||
}
|
||||
var port = vmDef.<Number> fromVm("display", "spice", "port")
|
||||
.map(Number::longValue);
|
||||
if (port.isEmpty()) {
|
||||
logger
|
||||
.severe(() -> "No port defined for display of " + vmDef.name());
|
||||
return null;
|
||||
return Optional.empty();
|
||||
}
|
||||
StringBuffer data = new StringBuffer(100)
|
||||
.append("[virt-viewer]\ntype=spice\nhost=")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue