From c2f35fff602b51bd79226efe5e81354488de7c7f Mon Sep 17 00:00:00 2001 From: chronolaw Date: Mon, 12 Aug 2024 17:37:56 +0800 Subject: [PATCH] clean some instances --- kong/clustering/compat/init.lua | 2 +- kong/conf_loader/constants.lua | 2 +- kong/hooks.lua | 2 +- kong/tools/http.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kong/clustering/compat/init.lua b/kong/clustering/compat/init.lua index 85bcf072d8da..13a1d32c132d 100644 --- a/kong/clustering/compat/init.lua +++ b/kong/clustering/compat/init.lua @@ -29,7 +29,7 @@ local COMPATIBILITY_CHECKERS = require("kong.clustering.compat.checkers") local CLUSTERING_SYNC_STATUS = constants.CLUSTERING_SYNC_STATUS local KONG_VERSION = meta.version -local EMPTY = {} +local EMPTY = require("kong.tools.table").EMPTY local _M = {} diff --git a/kong/conf_loader/constants.lua b/kong/conf_loader/constants.lua index 116ef68c1d04..894d80df3d7e 100644 --- a/kong/conf_loader/constants.lua +++ b/kong/conf_loader/constants.lua @@ -102,7 +102,7 @@ local UPSTREAM_HEADER_KEY_TO_NAME = { } -local EMPTY = {} +local EMPTY = require("kong.tools.table").EMPTY -- NOTE! Prefixes should always follow `nginx_[a-z]+_`. diff --git a/kong/hooks.lua b/kong/hooks.lua index 30cd6450eb0a..2cbb3a7b65ba 100644 --- a/kong/hooks.lua +++ b/kong/hooks.lua @@ -10,7 +10,7 @@ local unpack = table.unpack local insert = table.insert local type = type local select = select -local EMPTY = require("pl.tablex").readonly({}) +local EMPTY = require("kong.tools.table").EMPTY --[[ The preferred maximum number of return values from a hook, diff --git a/kong/tools/http.lua b/kong/tools/http.lua index ef3839739000..4fc9d177af66 100644 --- a/kong/tools/http.lua +++ b/kong/tools/http.lua @@ -24,7 +24,7 @@ local lower = string.lower local max = math.max local tab_new = require("table.new") -local EMPTY = pl_tblx.readonly({}) +local EMPTY = require("kong.tools.table").EMPTY local _M = {}