Skip to content

Commit

Permalink
kvm-libvirtCR: fix == should be .equals errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed Nov 4, 2024
1 parent a6cef7a commit 7f22d66
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,7 @@ public void detachAndAttachConfigDriveISO(final Connect conn, final String vmNam
List<DiskDef> disks = getDisks(conn, vmName);
DiskDef configdrive = null;
for (DiskDef disk : disks) {
if (disk.getDeviceType() == DiskDef.DeviceType.CDROM && disk.getDiskLabel() == CONFIG_DRIVE_ISO_DISK_LABEL) {
if (disk.getDeviceType() == DiskDef.DeviceType.CDROM && CONFIG_DRIVE_ISO_DISK_LABEL.equals(disk.getDiskLabel())) {
configdrive = disk;
}
}
Expand Down Expand Up @@ -3426,7 +3426,7 @@ public synchronized String attachOrDetachISO(final Connect conn, final String vm
final List<DiskDef> disks = getDisks(conn, vmName);
for (final DiskDef disk : disks) {
if (disk.getDeviceType() == DiskDef.DeviceType.CDROM
&& (diskSeq == null || disk.getDiskLabel() == iso.getDiskLabel())) {
&& (diskSeq == null || disk.getDiskLabel().equals(iso.getDiskLabel()))) {
cleanupDisk(disk);
}
}
Expand Down Expand Up @@ -4002,7 +4002,7 @@ public String stopVM(final Connect conn, final String vmName, final boolean forc
return stopVMInternal(conn, vmName, true);
}
String ret = stopVMInternal(conn, vmName, false);
if (ret == Script.ERR_TIMEOUT) {
if (Script.ERR_TIMEOUT.equals(ret)) {
ret = stopVMInternal(conn, vmName, true);
} else if (ret != null) {
/*
Expand Down

0 comments on commit 7f22d66

Please sign in to comment.