Synchronized on String#intern is a bad practice, interning a string will make it a global object .Which means if you synchronized the same interned strings in different parts of your code , some shit'll happen ,eg : deadlock
https://github.com/alibaba/dubbo/blob/9cf27a36848c22fbfd00877449fbe0eaf53e040c/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java#L333
Synchronized on
String#internis a bad practice, interning a string will make it a global object .Which means if you synchronized the same interned strings in different parts of your code , some shit'll happen ,eg : deadlockhttps://github.com/alibaba/dubbo/blob/9cf27a36848c22fbfd00877449fbe0eaf53e040c/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java#L333