sunbufu commented on issue #2666: Fixes #2629
URL: 
https://github.com/apache/incubator-shardingsphere/pull/2666#issuecomment-508917464
 
 
   > Hi, thanks for your pr.
   > In your pr, you said that if there is no shardingRule, 
`RoutingEngine.newInstance()` and `RoutingEngine.newInstance()` will throw NPE. 
But when will the shardingRule be null? Because if you want to sharding tables, 
shardingRule is necessary, otherwise you can not start up.
   > Can u give me some scenerios?
   
   Thank you for reply. I agree with you, and In my view, I think 
`RoutingEngine.newInstance()` should throw `ShardingException` replace NPE, 
when `ShardingRule` is empty (include null). You can find this code on 
`RoutingEngineFactory` in line 68 to 70.
   And, I think `ShardingDataSourceNames` is same with `RoutingEngine`. This 
code in lines 45 to 47 on `ShardingDataSourceNames` of my PR.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to