From e2c67f1932d5e6ddd2c109f2b695091131f02922 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Tue, 27 Aug 2019 14:28:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/util/GeneralKit.java | 21 ------------------- .../com/fanruan/api/util/GeneralKitTest.java | 7 +++++-- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/fanruan/api/util/GeneralKit.java b/src/main/java/com/fanruan/api/util/GeneralKit.java index 4c1fedb..fa0fd44 100644 --- a/src/main/java/com/fanruan/api/util/GeneralKit.java +++ b/src/main/java/com/fanruan/api/util/GeneralKit.java @@ -2,8 +2,6 @@ package com.fanruan.api.util; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; -import com.fr.stable.StableUtils; -import com.fr.base.TemplateUtils; import com.fr.third.guava.base.Objects; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -17,15 +15,6 @@ import java.util.Map; * Created by richie on 2019-08-09 */ public class GeneralKit { - /** - * 根据参数来计算文档字符串 - * @param query 文档来源 - * @param map 参数map - * @return 计算后结果 - */ - public static String renderParameter4Tpl(String query, Map map) throws Exception { - return TemplateUtils.renderParameter4Tpl(query, map); - } /** * 返回多个属性合并计算的哈希值 * @param args 对象列表 @@ -49,16 +38,6 @@ public class GeneralKit { return source!=null && source.equals(des); } } - /** - * 判断指定的类是否是另一个类的子类 - * @param childClass 指定的类 - * @param parentClass 另一个类 - * @return 如果指定类是另一个类的子类则返回true,否则返回false - */ - public static boolean classInstanceOf(Class childClass, Class parentClass) { - return StableUtils.classInstanceOf(childClass, parentClass); - } - /** * 返回系统的首选MAC地址 * diff --git a/src/test/java/com/fanruan/api/util/GeneralKitTest.java b/src/test/java/com/fanruan/api/util/GeneralKitTest.java index 205209d..849a0e4 100644 --- a/src/test/java/com/fanruan/api/util/GeneralKitTest.java +++ b/src/test/java/com/fanruan/api/util/GeneralKitTest.java @@ -31,10 +31,13 @@ public class GeneralKitTest extends Prepare { } @Test - public void hashCodes(){ - class A{}; + public void hashCodes() { + class A { + } + ; Object a = new A(); Assert.assertEquals(GeneralKit.hashCode(a), Objects.hashCode(a)); + } public void objectToString() { Integer s = new Integer(1); Assert.assertEquals(GeneralKit.objectToString(s),"1");