Skip to content

Commit 66ff3d2

Browse files
committedSep 19, 2017
Properly deal with empty tags
1 parent fa4b2ad commit 66ff3d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎modules/dbsupport/src/main/java/org/jpos/ee/converter/TagsConverter.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@
2525
@Converter(autoApply = true)
2626
public class TagsConverter implements AttributeConverter<Tags,String> {
2727
@Override
28-
public String convertToDatabaseColumn(Tags attribute) {
29-
return attribute.toString();
28+
public String convertToDatabaseColumn(Tags tags) {
29+
return tags != null && tags.size() > 0 ? tags.toString() : "";
3030
}
3131

3232
@Override
3333
public Tags convertToEntityAttribute(String dbData) {
3434
return new Tags(dbData);
3535
}
3636
}
37-

0 commit comments

Comments
 (0)