Copilot commented on code in PR #90:
URL: https://github.com/apache/dubbo-hessian-lite/pull/90#discussion_r2340752739
##########
hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassFactory.java:
##########
@@ -136,30 +136,23 @@ public Class<?> load(String className)
return aClass;
}
- if (aClass.getInterfaces().length > 0) {
- for (Class<?> anInterface : aClass.getInterfaces()) {
- if (!isAllow(anInterface.getName())) {
- log.log(Level.SEVERE, className + "'s interfaces: " +
anInterface.getName() + " in blacklist or not in whitelist, deserialization
with type 'HashMap' instead.");
- return HashMap.class;
- }
- }
+ for (Class<?> anInterface : aClass.getInterfaces()) {
+ String interfaceName = anInterface.getName();
+ if (!isAllow(interfaceName)) {
+ log.log(Level.SEVERE, className + "'s interfaces: " +
interfaceName
+ + " in blacklist or not in whitelist, deserialization with
type 'HashMap' instead.");
Review Comment:
[nitpick] The log message formatting is inconsistent with the original
single-line format. Consider keeping the message on a single line for
consistency with the superclass log message below.
```suggestion
log.log(Level.SEVERE, className + "'s interfaces: " +
interfaceName + " in blacklist or not in whitelist, deserialization with type
'HashMap' instead.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]