From d1fd6daa9ab9f5ce4b5785583a4ecae61e35e92a Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 5 Jan 2016 17:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84GsonAgent?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E7=B1=BB...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/cn/citycraft/Yum/manager/RepoCache.java | 8 ++++---- .../java/cn/citycraft/Yum/manager/RepositoryManager.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/citycraft/Yum/manager/RepoCache.java b/src/main/java/cn/citycraft/Yum/manager/RepoCache.java index 399e763..6e76b91 100644 --- a/src/main/java/cn/citycraft/Yum/manager/RepoCache.java +++ b/src/main/java/cn/citycraft/Yum/manager/RepoCache.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import cn.citycraft.PluginHelper.jsonresult.JsonHandler; +import cn.citycraft.PluginHelper.jsonresult.JsonHandle; import cn.citycraft.PluginHelper.utils.IOUtil; import cn.citycraft.Yum.manager.RepoSerialization.Repositories; @@ -15,7 +15,7 @@ public class RepoCache { Map repos = new HashMap(); public static RepoCache fromJson(final String json) { - return JsonHandler.fromJson(json, RepoCache.class); + return JsonHandle.fromJson(json, RepoCache.class); } public void addPlugins(final String name, final PluginInfo info) { @@ -51,7 +51,7 @@ public class RepoCache { if (json == null || json.isEmpty()) { return null; } - final Repositories reposes = JsonHandler.fromJson(json, Repositories.class); + final Repositories reposes = JsonHandle.fromJson(json, Repositories.class); if (reposes == null || reposes.repos.isEmpty()) { return null; } @@ -72,6 +72,6 @@ public class RepoCache { @Override public String toString() { - return JsonHandler.toJson(this); + return JsonHandle.toJson(this); } } diff --git a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java index 2b675da..15ddb65 100644 --- a/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java +++ b/src/main/java/cn/citycraft/Yum/manager/RepositoryManager.java @@ -14,7 +14,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; import cn.citycraft.PluginHelper.config.FileConfig; -import cn.citycraft.PluginHelper.jsonresult.JsonHandler; +import cn.citycraft.PluginHelper.jsonresult.JsonHandle; import cn.citycraft.PluginHelper.utils.IOUtil; import cn.citycraft.PluginHelper.utils.StringUtil; import cn.citycraft.Yum.manager.RepoSerialization.PackageInfo; @@ -171,14 +171,14 @@ public class RepositoryManager { public PackageInfo jsonToPackage(final String json) { try { - return JsonHandler.fromJson(json, PackageInfo.class); + return JsonHandle.fromJson(json, PackageInfo.class); } catch (final Exception e) { return null; } } public Repositories jsonToRepositories(final String json) { - return JsonHandler.fromJson(json, Repositories.class); + return JsonHandle.fromJson(json, Repositories.class); } public void updatePackage(final CommandSender sender, final PackageInfo pkg) {