Skip to content

Commit ca794b6

Browse files
authored
throw exception on path+version not found when decoding request (#8357)
1 parent bfa4b3b commit ca794b6

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport

dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@ public static void checkSerialization(String path, String version, Byte id) thro
162162
ServiceRepository repository = ApplicationModel.getServiceRepository();
163163
ProviderModel providerModel = repository.lookupExportedServiceWithoutGroup(path + ":" + version);
164164
if (providerModel == null) {
165-
if (logger.isWarnEnabled()) {
166-
logger.warn("Serialization security check is enabled but cannot work as expected because " +
167-
"there's no matched provider model for path " + path + ", version " + version);
168-
}
165+
throw new IOException("Service " + path + " with version " + version + " not found, invocation rejected.");
169166
} else {
170167
List<URL> urls = providerModel.getServiceConfig().getExportedUrls();
171168
if (CollectionUtils.isNotEmpty(urls)) {

0 commit comments

Comments
 (0)