review changes

This commit is contained in:
Noemi Szemenyei committed 2022-02-17 09:52:23 +01:00
1 parent c6fa60f28c
commit e3980a14a2
2 files changed
+10 -4

No files matched your search

@@ -333,16 +333,18 @@ public class PlatformDdl {
// e.g. @Column(columnDefinition = "db2;blob(64M);sqlserver,h2;varchar(227);varchar(127)")
private String extract(String type) {
String[] tmp = type.split(";");
assert tmp.length % 2 == 1;
for (int i = 0; i < tmp.length - 2; i+=2) {
if (tmp.length % 2 == 0) {
throw new IllegalArgumentException("You need an odd number of arguments. See Issue #2559 for details");
}
for (int i = 0; i < tmp.length - 2; i += 2) {
String[] platforms = tmp[i].split(",");
for (String plat : platforms) {
if (platform.isPlatform(Platform.valueOf(plat.toUpperCase(Locale.ENGLISH)))) {
return tmp[i+1];
return tmp[i + 1];
}
}
}
return tmp[tmp.length-1]; // else
return tmp[tmp.length - 1]; // else
}
/**