mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Organized an algorithm a bit more
This commit is contained in:
parent
e9fb906599
commit
06bbcde458
@ -1179,7 +1179,9 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
result = result.substring(0, result.length() - (fileType).length());
|
||||
}
|
||||
|
||||
String[] str = result.split("-");
|
||||
final String token = "-";
|
||||
|
||||
String[] str = result.split(token);
|
||||
int length = str.length;
|
||||
|
||||
if (length == 1 || length == 2) {
|
||||
@ -1187,7 +1189,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
}
|
||||
|
||||
if (length > 2) {
|
||||
return str[0] + "-" + str[1];
|
||||
return str[0] + token + str[1];
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user