Skip to content

Commit

Permalink
[BugFix] Fix driver URL loading error in JDBCScanner.java
Browse files Browse the repository at this point in the history
Signed-off-by: immutablecodes <[email protected]>
  • Loading branch information
immutablecodes committed Nov 12, 2024
1 parent 1274fa5 commit 45ce437
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

import java.io.File;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
Expand Down Expand Up @@ -61,7 +60,7 @@ public JDBCScanner(String driverLocation, JDBCScanContext scanContext) {

public void open() throws Exception {
String cacheKey = computeCacheKey(scanContext.getUser(), scanContext.getPassword(), scanContext.getJdbcURL());
URL driverURL = new File(driverLocation).toURI().toURL();
URL driverURL = new URL(driverLocation);
DataSourceCache.DataSourceCacheItem cacheItem = DataSourceCache.getInstance().getSource(cacheKey, () -> {
ClassLoader classLoader = URLClassLoader.newInstance(new URL[] {driverURL});
Thread.currentThread().setContextClassLoader(classLoader);
Expand Down

0 comments on commit 45ce437

Please sign in to comment.