From 9444e411487cff4a1ea1978cf6d674a414f61539 Mon Sep 17 00:00:00 2001 From: xiongcz Date: Thu, 15 May 2025 10:30:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor(CreateTempDrawingDialog):=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=B1=9E=E6=80=A7=E5=88=97=E8=A1=A8=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -跳过属性列表中的第一个元素(版本号) - 优化循环结构,提高代码可读性- 移除不必要的注释代码 --- .../createTempDrawings/dialogs/CreateTempDrawingDialog.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cn/net/connor/createTempDrawings/dialogs/CreateTempDrawingDialog.java b/src/cn/net/connor/createTempDrawings/dialogs/CreateTempDrawingDialog.java index f2d003c..b1ee8ce 100644 --- a/src/cn/net/connor/createTempDrawings/dialogs/CreateTempDrawingDialog.java +++ b/src/cn/net/connor/createTempDrawings/dialogs/CreateTempDrawingDialog.java @@ -87,6 +87,7 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{ /** * ѡеĶͣȡͶӦѡõϢ * 磺*=Item.object_name=string + * ע⣺ѡõϢУģõİ汾ţʱ; */ private List preferencePropList = new ArrayList<>(); @@ -327,7 +328,8 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{ String value = getComponentValue(key,entry.getValue());//ȡѡСֵ int tag = 0; //ѡãȡʵֵλá͵Ϣ - for (String prop : preferencePropList){ + for (int i = 1; i < preferencePropList.size(); i++){ + String prop = preferencePropList.get(i); String[] split = prop.split("="); if (split != null && split.length > 0) { String propName = split[0]; @@ -873,7 +875,6 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{ } System.out.println("õ = "+this.preferencePropList.size()); -// for(String propInfo : this.preferencePropList){//propInfoʽΪ*=Item.object_name=string String[] revIDs = this.preferencePropList.get(0).split(";");//汾 if (revIDs != null && revIDs.length > 0) {