From 4e2efcc14313350a1ecb371e89feb9ae95d5b98e Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Fri, 6 Mar 2020 17:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=9A=E9=87=8F=E6=89=93?= =?UTF-8?q?=E5=8C=85=E6=97=B6=E4=BC=9A=E6=97=A0=E6=B3=95=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/qy/ui/ModifySdkUi.java | 2 +- src/com/qy/utils/AutoRandomAdSDK.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/qy/ui/ModifySdkUi.java b/src/com/qy/ui/ModifySdkUi.java index b751cb9..53de251 100644 --- a/src/com/qy/ui/ModifySdkUi.java +++ b/src/com/qy/ui/ModifySdkUi.java @@ -35,7 +35,7 @@ public class ModifySdkUi extends JFrame{ private static final long serialVersionUID = 1L; public ModifySdkUi() { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - setTitle("\u7B2C\u4E09\u65B9SDK\u4FEE\u6539\u5DE5\u5177v1.4"); + setTitle("\u7B2C\u4E09\u65B9SDK\u4FEE\u6539\u5DE5\u5177v1.5"); // TODO Auto-generated constructor stub userEncrypt=new HashMap(); initView(); diff --git a/src/com/qy/utils/AutoRandomAdSDK.java b/src/com/qy/utils/AutoRandomAdSDK.java index c7742ce..0683cf9 100644 --- a/src/com/qy/utils/AutoRandomAdSDK.java +++ b/src/com/qy/utils/AutoRandomAdSDK.java @@ -515,9 +515,13 @@ public class AutoRandomAdSDK { } else { tmpName = name; } - - String nName = config.getJSONObject("rename") - .getString(tmpName.contains("$") ? tmpName.split("\\$")[0] : tmpName); + String nName; + if(config.getJSONObject("rename").isNull(tmpName.contains("$") ? tmpName.split("\\$")[0] : tmpName)){ + nName=name; + }else{ + nName = config.getJSONObject("rename") + .getString(tmpName.contains("$") ? tmpName.split("\\$")[0] : tmpName); + } if (nName.contains("[random]")) { String tName = Tools.getRandomString(new Random().nextInt(6) + 2); nName = nName.replace("[random]", tName);