wxbty commented on PR #10921: URL: https://github.com/apache/dubbo/pull/10921#issuecomment-1315349444
> > I noticed this change, it will be fixed in version 3.1, what I want to show is that the parent URL needs to guarantee its NPE check, so that no matter what, Exception won't happen on the path of the URL. If URL defines a new subclass, the author will notice that setHost may return null, and he needs to handle this exception. With the current way of writing, he will think that the URL must be returned. I think, all base class methods should consider null scenarios. > > The original solution can indeed solve the NPE problem to a certain extent. (You can reset this PR to the original commit, and I will merge it later.) > > In the future, we hope to turn the URL object into an interface at an appropriate time(may be 3.2). The abstract class URL no longer provides attribute storage and implementation, but only provides interface definition. Based on this, Dubbo's URL system is refactored to avoid the current need for various overriding methods. (Would you please help do this?) Ok, I'll be happy to do it -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org