From 5c1f6046edaf9b3bb0e835eb7206baabb654f147 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Fri, 30 Aug 2024 14:40:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20IdWorker#generateWorkerIdB?= =?UTF-8?q?aseOnMac=20=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java b/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java index 47c5ef0..6ed543b 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java @@ -161,7 +161,7 @@ public class IdWorker { * use lowest 10 bit of available MAC as workerId * @return workerId * @throws SocketException - * @throws Exception when there is no available mac found + * @throws NoAvailableMacFoundException when there is no available mac found */ private static long generateWorkerIdBaseOnMac() throws SocketException, NoAvailableMacFoundException { Enumeration all = NetworkInterface.getNetworkInterfaces(); @@ -185,4 +185,4 @@ public class IdWorker { private static long generateRandomWorkerId() { return ThreadLocalRandom.current().nextInt(MAX_WORKER_ID + 1); } -} \ No newline at end of file +}