allow "," as decimal separator in cpuUsed regular expression

This commit is contained in:
Pasquale Andriani 2012-10-23 19:50:26 +02:00
parent 26f4ccdbb6
commit 8cde490aad
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ public class VirtualMachine {
@Nullable VirtualMachine.State state, @Nullable String templateDisplayText, @Nullable String templateId,
@Nullable String templateName, @Nullable String zoneId, @Nullable String zoneName, @Nullable Set<NIC> nics,
@Nullable String hypervisor, @Nullable Set<SecurityGroup> securityGroups) {
Preconditions.checkArgument(Strings.isNullOrEmpty(cpuUsed) || cpuUsed.matches("^[0-9\\.\\-]+%$"), "cpuUsed value should be a decimal number followed by %");
Preconditions.checkArgument(Strings.isNullOrEmpty(cpuUsed) || cpuUsed.matches("^[0-9\\.|,\\-]+%$"), "cpuUsed value should be a decimal number followed by %");
this.id = checkNotNull(id, "id");
this.account = account;
this.cpuCount = cpuCount;