From f042238d74ceea8ab6689d500a21c3910c729ca7 Mon Sep 17 00:00:00 2001 From: Evan Saulpaugh Date: Fri, 27 Sep 2024 04:44:50 -0500 Subject: [PATCH] minor refactor --- src/main/java/com/esaulpaugh/headlong/abi/UnitType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/esaulpaugh/headlong/abi/UnitType.java b/src/main/java/com/esaulpaugh/headlong/abi/UnitType.java index 578959df..fabc4319 100644 --- a/src/main/java/com/esaulpaugh/headlong/abi/UnitType.java +++ b/src/main/java/com/esaulpaugh/headlong/abi/UnitType.java @@ -231,8 +231,6 @@ static void ensureInitialized() { } private static synchronized void initMaps(Object h) { - Objects.requireNonNull(h); - final int empty = 0; final int full = 108; final int size = BASE_TYPE_MAP.size(); @@ -246,6 +244,8 @@ private static synchronized void initMaps(Object h) { throw ise; } + Objects.requireNonNull(h); + final Map> map = BASE_TYPE_MAP; // optimized insertion order