From 50204f18faa9194f9110bed1d62bab89e4fafb6d Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Thu, 5 Sep 2019 15:11:54 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/action/UITableEditAction.java | 4 ++-- .../table/model/UITableModelAdapter.java | 1 + .../com/fanruan/api/security/SecurityKit.java | 9 +++++++++ .../com/fanruan/api/plugin/PluginKitTest.java | 13 ------------- .../com/fanruan/api/plugin/TestExtraClass.java | 12 ------------ .../fanruan/api/security/SecurityKitTest.java | 18 ++++++++++++++++++ 6 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 src/test/java/com/fanruan/api/plugin/PluginKitTest.java delete mode 100644 src/test/java/com/fanruan/api/plugin/TestExtraClass.java create mode 100644 src/test/java/com/fanruan/api/security/SecurityKitTest.java diff --git a/src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java b/src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java index 1c441cf..60da73c 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java +++ b/src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java @@ -5,8 +5,8 @@ import java.awt.event.ActionEvent; public class UITableEditAction extends com.fr.design.gui.itableeditorpane.UITableEditAction { @Override - public void checkEnabled() { - } + public void checkEnabled(){}; + @Override public void actionPerformed(ActionEvent e) { diff --git a/src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java b/src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java index be69b7a..a26bd78 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java +++ b/src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java @@ -20,6 +20,7 @@ public abstract class UITableModelAdapter extends com.fr.design.gui.itableedi super(strings); } + @Override public abstract UITableEditAction[] createAction(); diff --git a/src/main/java/com/fanruan/api/security/SecurityKit.java b/src/main/java/com/fanruan/api/security/SecurityKit.java index e6e903c..59c90d8 100644 --- a/src/main/java/com/fanruan/api/security/SecurityKit.java +++ b/src/main/java/com/fanruan/api/security/SecurityKit.java @@ -35,4 +35,13 @@ public class SecurityKit { public static String passwordDecode(String passwordText) { return CodeUtils.passwordDecode(passwordText); } + + /** + * 给字符串加密 + * @param passwordText 待加密的字符串 + * @return 解加密的字符串 + */ + public static String passwordEncode(String passwordText) { + return CodeUtils.passwordEncode(passwordText); + } } diff --git a/src/test/java/com/fanruan/api/plugin/PluginKitTest.java b/src/test/java/com/fanruan/api/plugin/PluginKitTest.java deleted file mode 100644 index 4c8a72f..0000000 --- a/src/test/java/com/fanruan/api/plugin/PluginKitTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.fanruan.api.plugin; - -import org.junit.Assert; -import org.junit.Test; - -public class PluginKitTest { - @Test - public void getArray(){ - PluginKit p1 = new PluginKit(); - TestExtraClass p2 = new TestExtraClass(); - Assert.assertEquals(p1.getArray("abcd"), p2.getArray("abcd")); - } -} diff --git a/src/test/java/com/fanruan/api/plugin/TestExtraClass.java b/src/test/java/com/fanruan/api/plugin/TestExtraClass.java deleted file mode 100644 index f81ed57..0000000 --- a/src/test/java/com/fanruan/api/plugin/TestExtraClass.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.fanruan.api.plugin; -import com.fr.plugin.injectable.PluginSingleInjection; - -public class TestExtraClass extends com.fr.plugin.AbstractExtraClassManager{ - protected boolean mountSpecific(PluginSingleInjection injection){ - return true; - } - - protected boolean demountSpecific(PluginSingleInjection injection){ - return true; - } -} diff --git a/src/test/java/com/fanruan/api/security/SecurityKitTest.java b/src/test/java/com/fanruan/api/security/SecurityKitTest.java new file mode 100644 index 0000000..6760606 --- /dev/null +++ b/src/test/java/com/fanruan/api/security/SecurityKitTest.java @@ -0,0 +1,18 @@ +package com.fanruan.api.security; + +import java.util.*; + +import com.fr.stable.CommonCodeUtils; +import org.junit.Assert; +import org.junit.Test; + +public class SecurityKitTest { + @Test + public void passwordDecode(){ + Assert.assertEquals(SecurityKit.passwordDecode("1234"), CommonCodeUtils.passwordDecode("1234")); + } + @Test + public void passwordEncode(){ + Assert.assertEquals(SecurityKit.passwordEncode("1234"), CommonCodeUtils.passwordEncode("1234")); + } +}