Browse Source

Merge pull request #1057 in DESIGN/design from ~HUGH.C/design:feature/10.0 to feature/10.0

* commit '1e874429a706b98ea011b07be9a9632c46a3f2ef':
  REPORT-20329 sonar问题修复
research/11.0
Hugh.C 5 years ago
parent
commit
892d88af67
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 7
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsLabel.java
  3. 1
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java
  4. 1
      designer-base/src/main/java/com/fr/design/update/actions/FileDownloader.java
  5. 1
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1091,6 +1091,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
thread.join(); thread.join();
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error("Map Thread Error"); FineLoggerFactory.getLogger().error("Map Thread Error");
Thread.currentThread().interrupt();
} }
DesignerEnvManager.getEnvManager().setLastOpenFile( DesignerEnvManager.getEnvManager().setLastOpenFile(

7
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsLabel.java

@ -19,12 +19,11 @@ public class VcsLabel extends ActionLabel {
} }
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
if (ui != null) { if (ui != null && g != null) {
Graphics scratchGraphics = (g == null) ? null : g.create(); Graphics scratchGraphics = g.create();
try { try {
ui.update(scratchGraphics, this); ui.update(scratchGraphics, this);
} } finally {
finally {
scratchGraphics.dispose(); scratchGraphics.dispose();
} }
} }

1
designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

@ -74,6 +74,7 @@ public class ColorPicker extends JDialog implements ActionListener
Thread.sleep(100); // 等待弹窗关闭 Thread.sleep(100); // 等待弹窗关闭
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} }
colorPickerPanel.captureScreen(); colorPickerPanel.captureScreen();
} }

1
designer-base/src/main/java/com/fr/design/update/actions/FileDownloader.java

@ -65,6 +65,7 @@ public abstract class FileDownloader extends SwingWorker<Boolean, DownloadItem>
success = get(); success = get();
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} catch (ExecutionException e) { } catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

1
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -385,6 +385,7 @@ public class UpdateMainDialog extends UIDialog {
showDownLoadInfo(); showDownLoadInfo();
} catch (InterruptedException e) { } catch (InterruptedException e) {
stopLoading(); stopLoading();
Thread.currentThread().interrupt();
} catch (ExecutionException e) { } catch (ExecutionException e) {
stopLoading(); stopLoading();
} finally { } finally {

Loading…
Cancel
Save