REQ-3045: 减少响应大小
This commit is contained in:
parent
2773abef15
commit
8d989c4085
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user