Skip to content

Commit

Permalink
SHIBUI-1788
Browse files Browse the repository at this point in the history
strip whitespace from "name" field
  • Loading branch information
chasegawa committed Jun 28, 2021
1 parent 058bacb commit e059c9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.persistence.JoinColumn;
import javax.persistence.Transient;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.envers.Audited;
Expand Down Expand Up @@ -120,6 +121,11 @@ public void setDisplayType(String displayType) {
// This is here to comply with the interface only and should not be used to change the value in this implementation
}

@Override
public void setName(String name) {
this.name = StringUtils.strip(name);
}

public void updateExamplesList() {
examples = customAttrListDefinitions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.Set;

import org.apache.commons.lang3.StringUtils;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
Expand Down Expand Up @@ -50,4 +52,9 @@ public void setDefaultValues(Set<String> defaults) {
defaultValues = defaults;
examples = defaults;
}

@Override
public void setName(String name) {
this.name = StringUtils.strip(name);
}
}

0 comments on commit e059c9b

Please sign in to comment.