DaanHoogland commented on a change in pull request #5194:
URL: https://github.com/apache/cloudstack/pull/5194#discussion_r668595190
##########
File path:
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
##########
@@ -615,10 +615,11 @@ private void
checkUnmanagedNicAndNetworkForImport(UnmanagedInstanceTO.Nic nic, N
!networkBroadcastUri.equals(String.format("vlan://%d",
nic.getVlan())))) {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
String.format("VLAN of network(ID: %s) %s is found different from the VLAN of
nic(ID: %s) vlan://%d during VM import", network.getUuid(),
networkBroadcastUri, nic.getNicId(), nic.getVlan()));
}
+ char pvLanType = nic.getPvlanType() == null ? '\0' :
nic.getPvlanType().toLowerCase().charAt(0);
Review comment:
```suggestion
String pvLanType = nic.getPvlanType() == null ? "" : new
String(nic.getPvlanType().toLowerCase().charAt(0));
```
i don't trust placing a null-char in the middle of a string. maybe I should
google a bit for this, but I'd rather insert a string on %s
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]