MyBatis version
3.5.3
Database vendor and version
Test case or example project
Steps to reproduce
Expected result
add modifier final to field
Actual result
`
class
org.apache.ibatis.type.JdbcType
// this could be final
private static Map
org.apache.ibatis.datasource.pooled.PoolState // if no subclass , this could be final protected PooledDataSource dataSource;
org.apache.ibatis.datasource.unpooled.UnpooledDataSource
// this could be final
private static Map
// field registeredDrivers is used in static code block static { ........ registeredDrivers.put(driver.getClass().getName(), driver); } }
AND synchronized code block
private synchronized void initializeDriver() throws SQLException { .... registeredDrivers.put(driver, driverInstance); ..... }
because registeredDrivers is private and has no get method, can replace registeredDrivers (ConcurrentHashMap) with HashMap?
`
Comment From: harawata
Hi @galleChristian , Could you just send a pull request? It's much easier for us to review. https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request And please use the proper syntax for code blocks in a comment. https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown
Comment From: harawata
No reply.