Browse Source

无JIRA任务 sonar问题修复

persist/11.0
Bryant 5 years ago
parent
commit
0533f537a5
  1. 5
      designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java
  2. 5
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  3. 6
      designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java
  4. 8
      designer-chart/src/main/java/com/fr/design/chart/report/GisMapTableDataContentPane.java
  5. 8
      designer-chart/src/main/java/com/fr/design/chart/report/MapMoreTableIndexPane.java
  6. 8
      designer-chart/src/main/java/com/fr/design/chart/report/MapTableDataSinglePane.java
  7. 3
      designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java
  8. 3
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPaneWithUISpinner.java
  9. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  10. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  11. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  12. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4MapPane.java
  13. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java
  14. 6
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugePlotPane.java
  15. 6
      designer-chart/src/main/java/com/fr/van/chart/line/VanChartLinePlotPane.java

5
designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java

@ -9,6 +9,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.NumberEditor; import com.fr.form.ui.NumberEditor;
import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -226,7 +227,7 @@ public class NumberEditorValidatePane extends JPanel {
} }
allowNegativeCheckBox.setSelected(e.isAllowNegative()); allowNegativeCheckBox.setSelected(e.isAllowNegative());
if (e.getMaxValue() == Double.MAX_VALUE) { if (AssistUtils.equals(e.getMaxValue(),Double.MAX_VALUE)) {
setMaxValueCheckBox.setSelected(false); setMaxValueCheckBox.setSelected(false);
maxValueSpinner.setValue(Double.MAX_VALUE); maxValueSpinner.setValue(Double.MAX_VALUE);
maxValueSpinner.setEnabled(false); maxValueSpinner.setEnabled(false);
@ -236,7 +237,7 @@ public class NumberEditorValidatePane extends JPanel {
maxValueSpinner.setValue(e.getMaxValue()); maxValueSpinner.setValue(e.getMaxValue());
} }
if (e.getMinValue() == -Double.MAX_VALUE) { if (AssistUtils.equals(e.getMinValue(),-Double.MAX_VALUE)) {
setMinValueCheckBox.setSelected(false); setMinValueCheckBox.setSelected(false);
minValueSpinner.setValue(-Double.MAX_VALUE); minValueSpinner.setValue(-Double.MAX_VALUE);
minValueSpinner.setEnabled(false); minValueSpinner.setEnabled(false);

5
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -633,9 +633,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
currentColumnNames[i] = new ColumnName(colNames[i]); currentColumnNames[i] = new ColumnName(colNames[i]);
} }
if (currentColumnNames == null) {
currentColumnNames = new ColumnName[0];
}
return currentColumnNames; return currentColumnNames;
} }
@ -701,7 +698,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
} else { } else {
dmlConfigComboBox.setSelectedIndex(0); dmlConfigComboBox.setSelectedIndex(0);
} }
jobs = new NameSubmitJob[dmlConfig == null ? 0 : dmlConfig.getSubmitJobCount()]; jobs = new NameSubmitJob[dmlConfig.getSubmitJobCount()];
for (int i = 0; i < jobs.length; i++) { for (int i = 0; i < jobs.length; i++) {
jobs[i] = dmlConfig.getSubmitJob(i); jobs[i] = dmlConfig.getSubmitJob(i);
} }

6
designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java

@ -182,11 +182,7 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane<GisMapRepo
String addressName = addressNamePane.updateBean(); String addressName = addressNamePane.updateBean();
if (addressName != null && !StringUtils.isBlank(addressName)) { if (addressName != null && !StringUtils.isBlank(addressName)) {
if (StableUtils.canBeFormula(addressName)) { reportDefinition.setAddressName(addressName);
reportDefinition.setAddressName(addressName);
} else {
reportDefinition.setAddressName(addressName);
}
} }
List values = seriesPane.updateBean(); List values = seriesPane.updateBean();
if (values != null && !values.isEmpty()) { if (values != null && !values.isEmpty()) {

8
designer-chart/src/main/java/com/fr/design/chart/report/GisMapTableDataContentPane.java

@ -341,12 +341,8 @@ public class GisMapTableDataContentPane extends FurtherBasicBeanPane<GisMapTable
titleValuePane.stopCellEditing(); titleValuePane.stopCellEditing();
} }
}); });
if (value != null && StringUtils.isNotEmpty(value.toString())) { box.setSelectedItem(value);
box.setSelectedItem(value);
} else {
box.setSelectedItem(value);
}
this.editorComponent = box; this.editorComponent = box;
} }

8
designer-chart/src/main/java/com/fr/design/chart/report/MapMoreTableIndexPane.java

@ -179,12 +179,8 @@ public class MapMoreTableIndexPane extends BasicBeanPane<MapSingleLayerTableDefi
tabPane.stopCellEditing(); tabPane.stopCellEditing();
} }
}); });
if (value != null && StringUtils.isNotEmpty(value.toString())) { box.setSelectedItem(value);
box.setSelectedItem(value);
} else {
box.setSelectedItem(value);
}
editorComponent = box; editorComponent = box;
} }

8
designer-chart/src/main/java/com/fr/design/chart/report/MapTableDataSinglePane.java

@ -254,12 +254,8 @@ public class MapTableDataSinglePane extends FurtherBasicBeanPane<MapSingleLayerT
titleValuePane.stopCellEditing(); titleValuePane.stopCellEditing();
} }
}); });
if (value != null && StringUtils.isNotEmpty(value.toString())) { box.setSelectedItem(value);
box.setSelectedItem(value);
} else {
box.setSelectedItem(value);
}
this.editorComponent = box; this.editorComponent = box;
} }

3
designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java

@ -348,9 +348,6 @@ public class UIGroupExtensionPane extends BasicPane {
boolean isSelected, boolean isSelected,
boolean cellHasFocus) { boolean cellHasFocus) {
JComponent c = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); JComponent c = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (!hasEditOperation(list)) {
return c;
}
Border border = null; Border border = null;
c.setBorder(border); c.setBorder(border);
UILabel editLabel = new UILabel(UIConstants.EDIT_ICON); UILabel editLabel = new UILabel(UIConstants.EDIT_ICON);

3
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPaneWithUISpinner.java

@ -7,6 +7,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.stable.AssistUtils;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -59,7 +60,7 @@ public abstract class AbstractMultiComponentPaneWithUISpinner<T extends JCompone
@Override @Override
public void setTextFieldValue(double value) { public void setTextFieldValue(double value) {
//如果为0,则没有改变值 //如果为0,则没有改变值
if (value == 0) { if (AssistUtils.equals(value,0)) {
return; return;
} }
super.setTextFieldValue(value); super.setTextFieldValue(value);

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -309,6 +309,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID);
if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){ if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){
editPane.reLayout(chart); editPane.reLayout(chart);
}else {
throw new IllegalArgumentException("editPane can not be null.");
} }
} }

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java

@ -140,7 +140,7 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa
} else if(data!= null && !this.boxItemsContainsObject(categoryCombox,data.getCategoryName())){ } else if(data!= null && !this.boxItemsContainsObject(categoryCombox,data.getCategoryName())){
categoryCombox.setSelectedItem(null); categoryCombox.setSelectedItem(null);
}else { }else {
combineCustomEditValue(categoryCombox, data == null ? null : data.getCategoryName()); combineCustomEditValue(categoryCombox, data.getCategoryName());
} }
seriesTypeComboxPane.populateBean(collection,this.isNeedSummaryCaculateMethod()); seriesTypeComboxPane.populateBean(collection,this.isNeedSummaryCaculateMethod());

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java

@ -310,11 +310,7 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
}); });
editorComponent = uiComboBox; editorComponent = uiComboBox;
if (value != null && StringUtils.isNotEmpty(value.toString())) { uiComboBox.getModel().setSelectedItem(value);
uiComboBox.getModel().setSelectedItem(value);
} else {
uiComboBox.getModel().setSelectedItem(value);
}
return uiComboBox; return uiComboBox;
} }

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4MapPane.java

@ -121,11 +121,7 @@ public class ChartDataPointLabel4MapPane extends ChartDatapointLabelPane {
percentFormat = attrContents.getPercentFormat(); percentFormat = attrContents.getPercentFormat();
if(textFontPane != null) { if(textFontPane != null) {
if (attrContents != null) { textFontPane.populate(attrContents.getTextAttr());
textFontPane.populate(attrContents.getTextAttr());
} else {
textFontPane.populate(FRFont.getInstance());
}
} }
} }

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java

@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.AssistUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -139,9 +140,9 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
} }
}else{ }else{
String key = this.keyInput.getText().trim(); String key = this.keyInput.getText().trim();
if(plot.isGisType() && key != plot.getBaiduKey()){ if(plot.isGisType() && !AssistUtils.equals(key,plot.getBaiduKey())){
plot.setBaiduKey(key); plot.setBaiduKey(key);
}else if(!plot.isGisType() && key != plot.getGoogleKey()){ }else if(!plot.isGisType() && !AssistUtils.equals(key,plot.getGoogleKey())){
plot.setGoogleKey(key); plot.setGoogleKey(key);
} }
} }

6
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugePlotPane.java

@ -55,7 +55,11 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane {
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); if (newPlot == null) {
throw new IllegalArgumentException("newPlot con not be null");
}else {
cloned = (Plot)newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In GaugeChart"); FineLoggerFactory.getLogger().error("Error In GaugeChart");
} }

6
designer-chart/src/main/java/com/fr/van/chart/line/VanChartLinePlotPane.java

@ -60,7 +60,11 @@ public class VanChartLinePlotPane extends AbstractVanChartTypePane {
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); if (newPlot == null) {
throw new IllegalArgumentException("newPlot con not be null");
}else {
cloned = (Plot)newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In LineChart"); FineLoggerFactory.getLogger().error("Error In LineChart");
} }

Loading…
Cancel
Save