From 7cb75c9a566ff51ec586fa826da7c3136e9edd5b Mon Sep 17 00:00:00 2001 From: huazhongming Date: Tue, 13 Dec 2022 15:36:19 +0800 Subject: [PATCH] Fix native reflect-config.json (#11125) --- .../META-INF/native-image/reflect-config.json | 4 +-- .../PortUnificationTransporter$Adaptive.java | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dubbo-native-plugin/src/main/resources/META-INF/native-image/reflect-config.json b/dubbo-native-plugin/src/main/resources/META-INF/native-image/reflect-config.json index 38d23920d7..0ebed14dc1 100644 --- a/dubbo-native-plugin/src/main/resources/META-INF/native-image/reflect-config.json +++ b/dubbo-native-plugin/src/main/resources/META-INF/native-image/reflect-config.json @@ -2072,7 +2072,7 @@ "methods": [ { "name": "", - "parameterTypes": [] + "parameterTypes": ["org.apache.dubbo.rpc.model.ApplicationModel"] } ] }, @@ -2146,7 +2146,7 @@ "methods": [ { "name": "", - "parameterTypes": [] + "parameterTypes": ["org.apache.dubbo.rpc.model.ApplicationModel"] } ] }, diff --git a/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java b/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java index 79207eb586..d5c1cc0a7a 100644 --- a/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java +++ b/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java @@ -18,22 +18,22 @@ package org.apache.dubbo.remoting.api.pu; import org.apache.dubbo.rpc.model.ScopeModel; import org.apache.dubbo.rpc.model.ScopeModelUtil; public class PortUnificationTransporter$Adaptive implements org.apache.dubbo.remoting.api.pu.PortUnificationTransporter { - public org.apache.dubbo.remoting.api.connection.AbstractConnectionClient connect(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException { - if (arg0 == null) throw new IllegalArgumentException("url == null"); - org.apache.dubbo.common.URL url = arg0; - String extName = url.getParameter("client", url.getParameter("transporter", "netty4")); - if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([client, transporter])"); - ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class); - org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName); - return extension.connect(arg0, arg1); - } - public org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer bind(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException { - if (arg0 == null) throw new IllegalArgumentException("url == null"); - org.apache.dubbo.common.URL url = arg0; - String extName = url.getParameter("server", url.getParameter("transporter", "netty4")); - if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([server, transporter])"); - ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class); - org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName); - return extension.bind(arg0, arg1); - } +public org.apache.dubbo.remoting.api.connection.AbstractConnectionClient connect(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException { +if (arg0 == null) throw new IllegalArgumentException("url == null"); +org.apache.dubbo.common.URL url = arg0; +String extName = url.getParameter("client", url.getParameter("transporter", "netty4")); +if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([client, transporter])"); +ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class); +org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName); +return extension.connect(arg0, arg1); +} +public org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer bind(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException { +if (arg0 == null) throw new IllegalArgumentException("url == null"); +org.apache.dubbo.common.URL url = arg0; +String extName = url.getParameter("server", url.getParameter("transporter", "netty4")); +if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([server, transporter])"); +ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class); +org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName); +return extension.bind(arg0, arg1); +} }