diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketDataChangedListener.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketDataChangedListener.java index bdf9095168c1..6c93dc3e4b40 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketDataChangedListener.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketDataChangedListener.java @@ -82,9 +82,9 @@ public void onProxySelectorChanged(final List proxySelectorDa } @Override - public void onDiscoveryUpstreamChanged(final List discoeryUpstreamList, final DataEventTypeEnum eventType) { + public void onDiscoveryUpstreamChanged(final List discoveryUpstreamList, final DataEventTypeEnum eventType) { WebsocketData configData = - new WebsocketData<>(ConfigGroupEnum.DISCOVER_UPSTREAM.name(), eventType.name(), discoeryUpstreamList); + new WebsocketData<>(ConfigGroupEnum.DISCOVER_UPSTREAM.name(), eventType.name(), discoveryUpstreamList); WebsocketCollector.send(GsonUtils.getInstance().toJson(configData), eventType); } diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/handle/PluginHandleChangedEvent.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/handle/PluginHandleChangedEvent.java index 85a7a2c75dfb..58f6c78b4d81 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/handle/PluginHandleChangedEvent.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/handle/PluginHandleChangedEvent.java @@ -34,7 +34,7 @@ public class PluginHandleChangedEvent extends AdminDataModelChangedEvent { * Create a new {@code PluginChangedEvent}.operator is unknown. * * @param source Current plugin state - * @param before Before the change plugiin state + * @param before Before the change plugin state * @param type event type * @param operator operator */ diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/metadata/MetaDataChangedEvent.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/metadata/MetaDataChangedEvent.java index 494b72896e73..ae16b37bf420 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/metadata/MetaDataChangedEvent.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/event/metadata/MetaDataChangedEvent.java @@ -34,7 +34,7 @@ public class MetaDataChangedEvent extends AdminDataModelChangedEvent { * Create a new {@code PluginChangedEvent}.operator is unknown. * * @param source Current plugin state - * @param before Before the change plugiin state + * @param before Before the change plugin state * @param type event type * @param operator operator */ diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertReceiverServiceImpl.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertReceiverServiceImpl.java index c87ffb0cdaac..a2749bd3fed0 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertReceiverServiceImpl.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertReceiverServiceImpl.java @@ -58,7 +58,7 @@ public AlertReceiverServiceImpl(final AlertReceiverMapper alertReceiverMapper, @Override public void addReceiver(final AlertReceiverDTO alertReceiverDTO) { - AlertReceiverDO receiverDO = AlertTransfer.INSTANCE.mapToAlertReciverDO(alertReceiverDTO); + AlertReceiverDO receiverDO = AlertTransfer.INSTANCE.mapToAlertReceiverDO(alertReceiverDTO); receiverDO.setId(UUIDUtils.getInstance().generateShortUuid()); Timestamp currentTime = new Timestamp(System.currentTimeMillis()); receiverDO.setDateCreated(currentTime); @@ -75,7 +75,7 @@ public void deleteReceiver(final List ids) { @Override public void updateReceiver(final AlertReceiverDTO alertReceiverDTO) { - AlertReceiverDO receiverDO = AlertTransfer.INSTANCE.mapToAlertReciverDO(alertReceiverDTO); + AlertReceiverDO receiverDO = AlertTransfer.INSTANCE.mapToAlertReceiverDO(alertReceiverDTO); alertDispatchService.clearCache(); alertReceiverMapper.updateByPrimaryKey(receiverDO); } diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/AlertTransfer.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/AlertTransfer.java index 6e00fcbcd547..6dbff2cd72dc 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/AlertTransfer.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/AlertTransfer.java @@ -38,7 +38,7 @@ public enum AlertTransfer { * @param alertReceiverDTO the alert receiver dto * @return the alert receiver do */ - public AlertReceiverDO mapToAlertReciverDO(final AlertReceiverDTO alertReceiverDTO) { + public AlertReceiverDO mapToAlertReceiverDO(final AlertReceiverDTO alertReceiverDTO) { return Optional.ofNullable(alertReceiverDTO) .map(v -> { AlertReceiverDO alertReceiverDO = new AlertReceiverDO(); diff --git a/shenyu-admin/src/test/java/org/apache/shenyu/admin/service/AlertReceiverServiceTest.java b/shenyu-admin/src/test/java/org/apache/shenyu/admin/service/AlertReceiverServiceTest.java index 6bc0f47bf95c..abc9e1214511 100644 --- a/shenyu-admin/src/test/java/org/apache/shenyu/admin/service/AlertReceiverServiceTest.java +++ b/shenyu-admin/src/test/java/org/apache/shenyu/admin/service/AlertReceiverServiceTest.java @@ -128,7 +128,7 @@ public void testSendTestMsg() { } private AlertReceiverDO buildAlertReceiverDO(final String id) { - AlertReceiverDO alertReceiverDO = AlertTransfer.INSTANCE.mapToAlertReciverDO(buildAlertReceiverDTO(id)); + AlertReceiverDO alertReceiverDO = AlertTransfer.INSTANCE.mapToAlertReceiverDO(buildAlertReceiverDTO(id)); Timestamp now = Timestamp.valueOf(LocalDateTime.now()); alertReceiverDO.setDateCreated(now); alertReceiverDO.setDateUpdated(now); diff --git a/shenyu-admin/src/test/java/org/apache/shenyu/admin/transfer/AlertTransferTest.java b/shenyu-admin/src/test/java/org/apache/shenyu/admin/transfer/AlertTransferTest.java index 49ab33059b5e..2c2a0057b0b2 100644 --- a/shenyu-admin/src/test/java/org/apache/shenyu/admin/transfer/AlertTransferTest.java +++ b/shenyu-admin/src/test/java/org/apache/shenyu/admin/transfer/AlertTransferTest.java @@ -102,7 +102,7 @@ public void setUp() { @Test void testMapToEntity() { - AlertReceiverDO entity = AlertTransfer.INSTANCE.mapToAlertReciverDO(alertReceiverDTO); + AlertReceiverDO entity = AlertTransfer.INSTANCE.mapToAlertReceiverDO(alertReceiverDTO); assertNotNull(entity); assertEquals(entity.getId(), alertReceiverDTO.getId()); assertEquals(entity.getName(), alertReceiverDTO.getName()); diff --git a/shenyu-registry/shenyu-registry-zookeeper/src/main/java/org/apache/shenyu/registry/zookeeper/ZookeeperClient.java b/shenyu-registry/shenyu-registry-zookeeper/src/main/java/org/apache/shenyu/registry/zookeeper/ZookeeperClient.java index e8531b0f171b..103425323430 100644 --- a/shenyu-registry/shenyu-registry-zookeeper/src/main/java/org/apache/shenyu/registry/zookeeper/ZookeeperClient.java +++ b/shenyu-registry/shenyu-registry-zookeeper/src/main/java/org/apache/shenyu/registry/zookeeper/ZookeeperClient.java @@ -137,7 +137,7 @@ public String getDirectly(final String key) { * @return value. */ public String get(final String key) { - TreeCache cache = findFromcache(key); + TreeCache cache = findFromCache(key); if (Objects.isNull(cache)) { return getDirectly(key); } @@ -257,7 +257,7 @@ public List subscribeChildrenChanges(final String key, final CuratorWatc * @param key key. * @return cache. */ - private TreeCache findFromcache(final String key) { + private TreeCache findFromCache(final String key) { for (Map.Entry cache : caches.entrySet()) { if (key.startsWith(cache.getKey())) { return cache.getValue(); diff --git a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuExtPathPluginJarLoader.java b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuExtPathPluginJarLoader.java index fce41f97d674..0113b9d2e421 100644 --- a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuExtPathPluginJarLoader.java +++ b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuExtPathPluginJarLoader.java @@ -61,7 +61,7 @@ public static synchronized List loadExtendPlugins(fin } Sets.SetView removePluginSet = Sets.difference(pluginJarName, currentPaths); for (String removePath : removePluginSet) { - ShenyuPluginClassloaderHolder.getSingleton().removePluginClassLoader(removePath); + ShenyuPluginClassLoaderHolder.getSingleton().removePluginClassLoader(removePath); } pluginJarName = currentPaths; return uploadPluginJars; diff --git a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java index 1324d3259bda..24b135de6633 100644 --- a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java +++ b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuLoaderService.java @@ -76,7 +76,7 @@ public ShenyuLoaderService(final ShenyuWebHandler webHandler, final CommonPlugin public void loadExtOrUploadPlugins(final PluginData uploadedJarResource) { try { List plugins = new ArrayList<>(); - ShenyuPluginClassloaderHolder singleton = ShenyuPluginClassloaderHolder.getSingleton(); + ShenyuPluginClassLoaderHolder singleton = ShenyuPluginClassLoaderHolder.getSingleton(); if (Objects.isNull(uploadedJarResource)) { List uploadPluginJars = ShenyuExtPathPluginJarLoader.loadExtendPlugins(shenyuConfig.getExtPlugin().getPath()); for (PluginJarParser.PluginJar extPath : uploadPluginJars) { diff --git a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassloaderHolder.java b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassLoaderHolder.java similarity index 85% rename from shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassloaderHolder.java rename to shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassLoaderHolder.java index 04e4ac93f151..388911914cd2 100644 --- a/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassloaderHolder.java +++ b/shenyu-web/src/main/java/org/apache/shenyu/web/loader/ShenyuPluginClassLoaderHolder.java @@ -22,23 +22,23 @@ import java.util.concurrent.ConcurrentHashMap; /** - * ShenyuPluginClassloaderHolder. + * ShenyuPluginClassLoaderHolder. */ -public final class ShenyuPluginClassloaderHolder { +public final class ShenyuPluginClassLoaderHolder { - private static final ShenyuPluginClassloaderHolder HOLDER = new ShenyuPluginClassloaderHolder(); + private static final ShenyuPluginClassLoaderHolder HOLDER = new ShenyuPluginClassLoaderHolder(); private final Map pluginCache = new ConcurrentHashMap<>(); - private ShenyuPluginClassloaderHolder() { + private ShenyuPluginClassLoaderHolder() { } /** * getSingleton. * - * @return ShenyuPluginClassloaderHolder + * @return ShenyuPluginClassLoaderHolder */ - public static ShenyuPluginClassloaderHolder getSingleton() { + public static ShenyuPluginClassLoaderHolder getSingleton() { return HOLDER; }