From 255b543d6c85db4f8b9037e791e8e973703c7ec8 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Tue, 8 Apr 2025 14:16:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/line/SpecialAnalysisServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java index df72caa..b629313 100644 --- a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java @@ -124,20 +124,18 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService { //设置波形查询的条件:事件ID monitorTerminalParam.setId(rmpEventDetailPO.getEventId()); //获取RMS波形数据(由于WaveDataDTO为复杂对象所以转成byte数组在进行反序列化) - byte[] bytes = transientFeignClient.getTransientAnalyseWaveToByteArray(monitorTerminalParam).getData(); WaveDataDTO waveDataDTO = null; try { + byte[] bytes = transientFeignClient.getTransientAnalyseWaveToByteArray(monitorTerminalParam).getData(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bis); //强转成WaveDataDTO waveDataDTO = (WaveDataDTO) ois.readObject(); bis.close(); ois.close(); - bytes=null; + Arrays.fill(bytes, (byte)0); } catch (Exception e) { e.printStackTrace(); - } finally { - System.gc(); } if (ObjectUtil.isNotNull(waveDataDTO)) { //标称电压