AdvancedBan
AdvancedBan copied to clipboard
Remove Class.forName in DynamicDataSource
This is an antiquated approach to ensure a JDBC driver is loaded, which somehow stubbornly persists to this day. Since Java 6, the ServiceLoader mechanism is used to load java.sql.Driver implementations. The JDBC url is therefore sufficient to load Drivers.
Only very, very old JDBC drivers which are not JDBC 4.0-compliant will not have a ServiceLoader file. Fortunately, Connector-J introduced support in 5.1.3, way back in 2007.
This means the Class.forName call can be safely removed from DynamicDataSource