This commit is contained in:
温少
2012-03-21 01:52:26 +08:00
parent 3d7d476e0d
commit c518d8f39e
19 changed files with 137 additions and 121 deletions
@@ -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)) {