mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package cn.hutool.db.ds.simple;
|
||||
|
||||
import cn.hutool.core.clone.CloneRuntimeException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.Closeable;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.DriverManager;
|
||||
@@ -7,8 +10,6 @@ import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* 数据源抽象实现
|
||||
* @author Looly
|
||||
@@ -53,4 +54,13 @@ public abstract class AbstractDataSource implements DataSource, Cloneable, Close
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
throw new SQLFeatureNotSupportedException("DataSource can't support getParentLogger method!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractDataSource clone() {
|
||||
try {
|
||||
return (AbstractDataSource) super.clone();
|
||||
} catch (final CloneNotSupportedException e) {
|
||||
throw new CloneRuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user