1.fix index out of bounds issue

main
Gary 11 months ago
parent 01af3116ff
commit 9e08a435e0

@ -164,10 +164,11 @@ public class TagService {
tag.setDescription(updateReq.getDescription());
// tag.setUpdaterId(RequestContext.get().getId());
String srcKey = null;
if (null == updateReq.getImage()) {
tag.setImage(null);
} else {
String srcKey = null;
if (updateReq.getImage().contains(TagS3Service.TEMP_KEY_PREFIX)) {
srcKey = updateReq.getImage().substring(updateReq.getImage().indexOf(TagS3Service.TEMP_KEY_PREFIX));
}
@ -181,6 +182,7 @@ public class TagService {
if (null == updateReq.getThumbnail()) {
tag.setThumbnail(null);
} else {
String srcKey = null;
if (updateReq.getThumbnail().contains(TagS3Service.TEMP_KEY_PREFIX)) {
srcKey = updateReq.getThumbnail().substring(updateReq.getThumbnail().indexOf(TagS3Service.TEMP_KEY_PREFIX));
}

Loading…
Cancel
Save