From c44a0dd1af17a8a9d440905bc69e98312253496f Mon Sep 17 00:00:00 2001 From: author Date: Tue, 27 Aug 2019 14:12:35 +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 --- .../src/main/java/com/fr/design/utils/DrawRoutines.java | 1 + designer-base/src/main/java/com/fr/env/RemoteEnvPane.java | 1 + .../java/com/fr/start/server/FineEmbedServerMonitor.java | 1 + .../fr/design/chart/series/PlotSeries/MapImageEditPane.java | 6 +++++- .../com/fr/design/mainframe/chart/gui/ChartDataPane.java | 5 ++++- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/DrawRoutines.java b/designer-base/src/main/java/com/fr/design/utils/DrawRoutines.java index d6b3fbb035..0fb8930157 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DrawRoutines.java +++ b/designer-base/src/main/java/com/fr/design/utils/DrawRoutines.java @@ -206,6 +206,7 @@ public class DrawRoutines { grabber.grabPixels(); } catch (InterruptedException e) { FineLoggerFactory.getLogger().error("PixelGrabber interrupted waiting for pixels"); + Thread.currentThread().interrupt(); } if ((grabber.getStatus() & ImageObserver.ABORT) != 0) { diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 9b97c43599..d273a00a2d 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -548,6 +548,7 @@ public class RemoteEnvPane extends BasicBeanPane { FineLoggerFactory.getLogger().error(e, e.getMessage()); message.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Failed")); uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); + Thread.currentThread().interrupt(); } dialogDownPane.remove(cancelButton); dialogDownPane.revalidate(); diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java index 5807773bff..75b11bc3be 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java @@ -81,6 +81,7 @@ public class FineEmbedServerMonitor { try { Thread.sleep(STEP_HEARTBEAT); } catch (InterruptedException ignore) { + Thread.currentThread().interrupt(); } } DesignerContext.getDesignerFrame().hideProgressDialog(); diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java index 54e6667392..7773e9fed6 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java @@ -245,7 +245,11 @@ public class MapImageEditPane extends BasicBeanPane { g2d.translate(moveLeft, moveTop); g2d.setStroke(new BasicStroke(1)); - if (resultAreaShape != null && !resultAreaShape.isEmpty()) { + + if (resultAreaShape == null) { + throw new IllegalArgumentException("resultAreaShape can not be null!"); + } + if (!resultAreaShape.isEmpty()) { for (String key : resultAreaShape.keySet()) { GeneralPath selectShape = getSelectedNodePath(key); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java index aef8d6551d..5aed1e47d6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java @@ -56,7 +56,10 @@ public class ChartDataPane extends AbstractChartAttrPane { } this.setLayout(new BorderLayout(0, 0)); - if (collection != null && collection.getChartCount() <= 0) { + if (collection == null) { + throw new IllegalArgumentException("ChartCollection can not be null!"); + } + if (collection.getChartCount() <= 0) { contentsPane = new NormalChartDataPane(listener, ChartDataPane.this); } else if (collection.getSelectedChart().getPlot() instanceof MapPlot) { contentsPane = new MapDataPane(listener);