review changes

This commit is contained in:
Noemi Szemenyei
2022-02-17 09:52:23 +01:00
parent c6fa60f28c
commit e3980a14a2
2 changed files with 10 additions and 4 deletions
@@ -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
}
/**
@@ -5,6 +5,7 @@ import io.ebean.annotation.EnumValue;
import io.ebean.annotation.Index;
import io.ebean.annotation.NotNull;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
@@ -41,6 +42,9 @@ public class EBasic {
@Size(max=127)
String description;
@Column(columnDefinition = "db2;blob(64M);sqlserver,h2;varchar(227);varchar(127)")
String description2;
Timestamp someDate;