REQ-3045: 减少响应大小

This commit is contained in:
yanglin 2024-10-24 11:02:33 +08:00
parent 2773abef15
commit 8d989c4085

View File

@ -26,7 +26,7 @@ public class ModelVersion {
public static ModelVersion of(Integer version) {
// attack?
if (version != null && version > 500)
if (version != null && version > 500 && version < Integer.MAX_VALUE)
throw new ServiceException("model version is too large");
if (version == null) version = Integer.MIN_VALUE;
return VERSIONS.computeIfAbsent(version, ModelVersion::new);