in foreign/java/java-sdk/src/main/java/rs/iggy/identifier/Identifier.java [30:44]
protected Identifier(@Nullable String name, @Nullable Long id) {
if (StringUtils.isBlank(name) && id == null) {
throw new IllegalArgumentException("Name and id cannot be blank");
}
if (StringUtils.isNotBlank(name) && id != null) {
throw new IllegalArgumentException("Name and id cannot be both present");
}
if (StringUtils.isNotBlank(name)) {
this.name = name;
this.id = null;
} else {
this.name = null;
this.id = id;
}
}