Refactored from new Boolean and new Integer to Boolean.valueOf and Integer.valueOf due to deprecation warnings.

This commit is contained in:
thzero 2022-02-26 09:47:57 -06:00
parent b307ab7613
commit 05aae61932
4 changed files with 9 additions and 9 deletions

View File

@ -521,7 +521,7 @@ public class CustomExpression implements Cloneable {
* Used for temporary substitution when evaluating index and range expressions.
*/
public String hash() {
Integer hashint = new Integer(this.getExpressionString().hashCode() + symbol.hashCode());
Integer hashint = Integer.valueOf(this.getExpressionString().hashCode() + symbol.hashCode());
String hash = "$";
for (char c : hashint.toString().toCharArray()) {
if (c == '-')

View File

@ -78,7 +78,7 @@ class MotorMountTableModel extends AbstractTableModel implements ComponentChange
public Object getValueAt(int row, int column) {
switch (column) {
case 0:
return new Boolean(potentialMounts.get(row).isMotorMount());
return Boolean.valueOf(potentialMounts.get(row).isMotorMount());
case 1:
return potentialMounts.get(row).toString();

View File

@ -534,7 +534,7 @@ public class SimulationPlotPanel extends JPanel {
public Object getValueAt(int row, int column) {
switch (column) {
case 0:
return new Boolean(configuration.isEventActive(eventTypes[row]));
return Boolean.valueOf(configuration.isEventActive(eventTypes[row]));
case 1:
return eventTypes[row].toString();

View File

@ -323,9 +323,9 @@ public class MultiSlider extends JSlider {
accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
(oldModel == null
? null : new Integer(oldModel.getValue())),
? null : Integer.valueOf(oldModel.getValue())),
(newModel == null
? null : new Integer(newModel.getValue())));
? null : Integer.valueOf(newModel.getValue())));
}
}
@ -348,7 +348,7 @@ public class MultiSlider extends JSlider {
for (int i = 0; i < count; i++) {
getModelAt(i).setMinimum(minimum);
}
firePropertyChange( "minimum", new Integer( oldMin ), new Integer( minimum ) );
firePropertyChange("minimum", Integer.valueOf(oldMin), Integer.valueOf(minimum));
}
/***
@ -367,7 +367,7 @@ public class MultiSlider extends JSlider {
for (int i = 0; i < count; i++) {
getModelAt(i).setMaximum(maximum);
}
firePropertyChange( "maximum", new Integer( oldMax ), new Integer( maximum ) );
firePropertyChange("maximum", Integer.valueOf(oldMax), Integer.valueOf(maximum));
}
/***
@ -427,8 +427,8 @@ public class MultiSlider extends JSlider {
if (accessibleContext != null) {
accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
new Integer(oldValue),
new Integer(m.getValue()));
Integer.valueOf(oldValue),
Integer.valueOf(m.getValue()));
}
}