mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor
This commit is contained in:
@@ -26,7 +26,7 @@ import java.io.Writer;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.util.JdbcUtils;
|
||||
import com.alibaba.druid.util.IOUtils;
|
||||
|
||||
public class TestReplaceLicense extends TestCase {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class TestReplaceLicense extends TestCase {
|
||||
protected void setUp() throws Exception {
|
||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("License.txt");
|
||||
Reader reader = new InputStreamReader(is);
|
||||
license = JdbcUtils.read(reader);
|
||||
license = IOUtils.read(reader);
|
||||
reader.close();
|
||||
System.out.println(license);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class TestReplaceLicense extends TestCase {
|
||||
public void listJavaFile(File file) throws Exception {
|
||||
FileInputStream in = new FileInputStream(file);
|
||||
InputStreamReader reader = new InputStreamReader(in, "utf-8");
|
||||
String content = JdbcUtils.read(reader);
|
||||
String content = IOUtils.read(reader);
|
||||
reader.close();
|
||||
|
||||
if (!content.startsWith(license)) {
|
||||
|
||||
Reference in New Issue
Block a user