From 2698a10f92ad7565d32355bd3bcaa69bfad0d09a Mon Sep 17 00:00:00 2001 From: wukong Date: Thu, 17 Dec 2015 01:33:21 +0800 Subject: [PATCH] =?UTF-8?q?JDK=E6=94=B9=E4=B8=BA1.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION.TXT | 12 +++++++--- pom.xml | 22 +++++++++---------- .../java/band/wukong/util/EncryptionUtil.java | 9 ++++++-- src/main/java/band/wukong/util/FileUtil.java | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/VERSION.TXT b/VERSION.TXT index 95c3cc7..b4dc07d 100644 --- a/VERSION.TXT +++ b/VERSION.TXT @@ -1,7 +1,15 @@ + +wukong-util-0.1.2 [2015.1217] +====================================== +1.增加ReflectUtil +2.JDK改为1.6 +3.更新POM文件 + + wukong-util-0.1.1.2015.1129 ====================================== -1.更新PropertiesUtil。 +1.更新PropertiesUtil. 注意:API变更!!! @@ -9,5 +17,3 @@ wukong-util-0.1.0.2015.0717 ====================================== 1、基于TestJava.2014.0809.1638.zip重构,整理出band.wukong.util 2、对所有类、方法做了若干调整,增加缺少的单元测试用例 - - diff --git a/pom.xml b/pom.xml index 681a94e..a8fa55b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,11 +4,18 @@ band.wukong wukong-util - 0.1.1 + 0.1.2 jar wukong-util http://www.wukong.band/code/wukong-util + + UTF-8 + UTF-8 + UTF-8 + UTF-8 + + junit @@ -19,15 +26,15 @@ - wukong-util-${version} + ${project.artifactId}-${project.version} org.apache.maven.plugins maven-compiler-plugin 3.1 - 1.7 - 1.7 + 1.6 + 1.6 @@ -38,11 +45,4 @@ - - UTF-8 - UTF-8 - UTF-8 - UTF-8 - - diff --git a/src/main/java/band/wukong/util/EncryptionUtil.java b/src/main/java/band/wukong/util/EncryptionUtil.java index 0a31f13..4e9c574 100644 --- a/src/main/java/band/wukong/util/EncryptionUtil.java +++ b/src/main/java/band/wukong/util/EncryptionUtil.java @@ -26,13 +26,18 @@ public static String encrypt(String source, Algorithm algorithm) { if (algorithm == Algorithm.MD5) { try { return md5(source); - } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } + } else if (algorithm == Algorithm.SHA1) { try { return sha1(source); - } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } diff --git a/src/main/java/band/wukong/util/FileUtil.java b/src/main/java/band/wukong/util/FileUtil.java index 12924d8..060ed46 100644 --- a/src/main/java/band/wukong/util/FileUtil.java +++ b/src/main/java/band/wukong/util/FileUtil.java @@ -45,7 +45,7 @@ public static String getFileNameWithoutExtension(String fileName) { } public static List readLines(String file) { - List slist = new ArrayList<>(); + List slist = new ArrayList(); BufferedReader in; try {