Skip to content

Commit

Permalink
Update PR#8624: change return type of Nic.getInstanceId from long to …
Browse files Browse the repository at this point in the history
…Long
  • Loading branch information
weizhouapache committed Feb 12, 2024
1 parent c426a19 commit 9855c1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/vm/Nic.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public enum ReservationStrategy {
/**
* @return the vm instance id that this nic belongs to.
*/
long getInstanceId();
Long getInstanceId();

int getDeviceId();

Expand Down
2 changes: 1 addition & 1 deletion engine/schema/src/main/java/com/cloud/vm/NicVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public long getId() {
}

@Override
public long getInstanceId() {
public Long getInstanceId() {
return instanceId;
}

Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/com/cloud/api/ApiResponseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ private void addSystemVmInfoToIpResponse(NicVO nic, IPAddressResponse ipResponse
if (!isAdmin) {
return;
}
if (nic == null || Nic.ReservationStrategy.PlaceHolder.equals(nic.getReservationStrategy())) {
if (nic == null || nic.getInstanceId() == null) {
return;
}
VirtualMachine vm = ApiDBUtils.findVMInstanceById(nic.getInstanceId());
Expand Down

0 comments on commit 9855c1c

Please sign in to comment.