From 9008df794c1981c7cef83c562ff7b9d6e8ab6146 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Wed, 25 Sep 2019 11:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8Csonar?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/loghandler/DesignerLogHandler.java | 2 +- .../java/com/fr/design/update/ui/dialog/EncodingDetect.java | 6 +----- .../com/fr/design/update/ui/dialog/UpdateMainDialog.java | 4 ++-- .../src/main/java/com/fr/design/utils/DesignUtils.java | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java index 79e94d399..53802507c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java @@ -42,7 +42,7 @@ import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_M public class DesignerLogHandler { - private static final SimpleDateFormat LOG_SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private final SimpleDateFormat LOG_SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private static final int GAP_X = -150; diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java index d782428ce..e4bbaebac 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java @@ -447,11 +447,7 @@ class BytesEncodingDetect extends Encoding { bfchars++; totalfreq += 500; row = rawtext[i] - 0x81; - if (0x40 <= rawtext[i + 1] && rawtext[i + 1] <= 0x7E) { - column = rawtext[i + 1] - 0x40; - } else { - column = rawtext[i + 1] - 0x40; - } + column = rawtext[i + 1] - 0x40; // System.out.println("extended row " + row + " column " + column + " rawtext[i] " + rawtext[i]); if (Big5PFreq[row][column] != 0) { bffreq += Big5PFreq[row][column]; diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index c7eceb050..9e83e40dd 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -91,8 +91,8 @@ public class UpdateMainDialog extends UIDialog { private static final String UPDATE_CACHE_STATE_FAIL = "fail"; private static final String UPDATE_CACHE_STATE_SUCCESS = "success"; - private static final SimpleDateFormat CHANGELOG_FORMAT = new SimpleDateFormat("M/d/y, h:m:s a", Locale.ENGLISH); - private static final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); + private final SimpleDateFormat CHANGELOG_FORMAT = new SimpleDateFormat("M/d/y, h:m:s a", Locale.ENGLISH); + private final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); private JSONObject downloadFileConfig; //最新版本标签 diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index b31209381..8d32e6e0e 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -56,7 +56,7 @@ public class DesignUtils { DesignUtils.port = port; } - public static int getPort() { + public synchronized static int getPort() { return port; }