diff --git a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java index ad7d1bb1..f7a97c41 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java @@ -1125,13 +1125,12 @@ public class DetectionServiceImpl { public List getDoubles(List t) { if (CollUtil.isNotEmpty(t)) { - if (t == null || t.size() < 2) { - return t; + if (t.size() > 2) { + Double max = Collections.max(t); + Double min = Collections.min(t); + t.remove(max); + t.remove(min); } - Double max = Collections.max(t); - Double min = Collections.min(t); - t.remove(max); - t.remove(min); } return t; }