Browse Source

REPORT-20323 sonar问题修复

research/11.0
Maksim 5 years ago
parent
commit
7ea83ebbe9
  1. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  2. 1
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  3. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormToolBar.java
  4. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormToolBarPane.java
  5. 1
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  6. 4
      designer-form/src/main/java/com/fr/design/mainframe/widget/UITreeComboBox.java

2
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -252,7 +252,7 @@ public class FormCreatorDropTarget extends DropTarget {
* *
* @param dtde 事件 * @param dtde 事件
*/ */
public void drop(DropTargetDropEvent dtde) { public synchronized void drop(DropTargetDropEvent dtde) {
Point loc = dtde.getLocation(); Point loc = dtde.getLocation();
this.adding(loc.x, loc.y); this.adding(loc.x, loc.y);
//针对在表单中拖入一个控件直接ctrl+s无反应 //针对在表单中拖入一个控件直接ctrl+s无反应

1
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -1368,6 +1368,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
Thread.sleep(1500); Thread.sleep(1500);
} catch (InterruptedException e) { } catch (InterruptedException e) {
FRLogger.getLogger().error(e.getMessage(), e); FRLogger.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} }
pane.setLayout(new BorderLayout()); pane.setLayout(new BorderLayout());

2
designer-form/src/main/java/com/fr/design/mainframe/FormToolBar.java

@ -20,7 +20,7 @@ public class FormToolBar {
} }
public void setButtonlist(List<FormToolBarButton> buttonlist) { public void setButtonlist(List<FormToolBarButton> buttonlist) {
if (buttonlist == null || buttonlist.size() < 0) { if (buttonlist == null) {
this.buttonlist = new ArrayList<FormToolBarButton>(); this.buttonlist = new ArrayList<FormToolBarButton>();
} else { } else {
this.buttonlist = buttonlist; this.buttonlist = buttonlist;

2
designer-form/src/main/java/com/fr/design/mainframe/FormToolBarPane.java

@ -118,7 +118,7 @@ public class FormToolBarPane extends BasicBeanPane<ToolBar> {
} }
private void setToolBar(List<FormToolBarButton> list) { private void setToolBar(List<FormToolBarButton> list) {
if (list == null || list.size() < 0) { if (list == null) {
return; return;
} }
this.removeAll(); this.removeAll();

1
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -765,6 +765,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
Thread.sleep(1500); Thread.sleep(1500);
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} }
JPanel pane = new JPanel(); JPanel pane = new JPanel();
pane.setLayout(new BorderLayout()); pane.setLayout(new BorderLayout());

4
designer-form/src/main/java/com/fr/design/mainframe/widget/UITreeComboBox.java

@ -192,7 +192,11 @@ public class UITreeComboBox extends UIComboBox {
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (o != null) {
return o.getClass() == this.getClass(); return o.getClass() == this.getClass();
} else {
return false;
}
} }
} }

Loading…
Cancel
Save