zone1511 commented on issue #763: Decouple JDBCURL parser logic from URLParser URL: https://github.com/apache/incubator-skywalking/issues/763#issuecomment-359471406 Consider the following code fragment from `SWConnectionTest` ```java @Before public void setUp() throws Exception { swConnection = new SWConnection("jdbc:mysql://127.0.0.1:3306/test", new Properties(), jdbcConnection); multiHostConnection = new SWConnection("jdbc:mysql://127.0.0.1:3306,127.0.0.1:3309/test", new Properties(), jdbcConnection); when(jdbcConnection.prepareStatement(anyString())).thenReturn(mysqlPreparedStatement); } ``` Before refactor the `URLParser` it can handle parsing the mysql url inside jdbc-common project. so the above code works fine in jdbc-common project. However, after moving each plugin's parser back to its own project, the above code will fail, as due to the urlparser SPI, the jdbc-common project will not able to handle mysql's jdbc parsing and cause some code return NPE afterward.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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
