From af2cbc2a24b3724e7fc3e6b42e134b21a3144c75 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期四, 17 二月 2022 15:33:19 +0800 Subject: [PATCH] 过滤掉非json数据不传给三方使用 --- HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/utils/IpUtils.java | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/utils/IpUtils.java b/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/utils/IpUtils.java index 2f2f010..97620f2 100644 --- a/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/utils/IpUtils.java +++ b/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/utils/IpUtils.java @@ -19,21 +19,21 @@ * @return 骞挎挱鍦板潃 */ public static String getBroadcastAddress() { - try { - for (Enumeration<NetworkInterface> niEnum = NetworkInterface.getNetworkInterfaces(); - niEnum.hasMoreElements(); ) { - NetworkInterface ni = niEnum.nextElement(); - if (!ni.isLoopback()) { - for (InterfaceAddress interfaceAddress : ni.getInterfaceAddresses()) { - if (interfaceAddress.getBroadcast() != null) { - return interfaceAddress.getBroadcast().toString().substring(1); - } - } - } - } - } catch (SocketException e) { - e.printStackTrace(); - } +// try { +// for (Enumeration<NetworkInterface> niEnum = NetworkInterface.getNetworkInterfaces(); +// niEnum.hasMoreElements(); ) { +// NetworkInterface ni = niEnum.nextElement(); +// if (!ni.isLoopback()) { +// for (InterfaceAddress interfaceAddress : ni.getInterfaceAddresses()) { +// if (interfaceAddress.getBroadcast() != null) { +// return interfaceAddress.getBroadcast().toString().substring(1); +// } +// } +// } +// } +// } catch (SocketException e) { +// e.printStackTrace(); +// } return "255.255.255.255"; } -- Gitblit v1.8.0