mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor the codes related to DataSourceSelector
This commit is contained in:
@@ -167,11 +167,9 @@ public class HighAvailableDataSource extends WrapperAdapter implements DataSourc
|
||||
}
|
||||
|
||||
public void setSelector(String name) {
|
||||
if (name != null && this.selector != null && this.selector.isSame(name)) {
|
||||
return;
|
||||
}
|
||||
DataSourceSelector selector = DataSourceSelectorFactory.getSelector(name, this);
|
||||
if (selector != null) {
|
||||
selector.init();
|
||||
setDataSourceSelector(selector);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user