removed use of methods deprecated in java 11

pull/11/head
Stefan Feuerhahn 7 years ago
parent 2419583978
commit 72494fb83d

@ -880,9 +880,9 @@ public class SclParser {
BdaBoolean bda = new BdaBoolean(new ObjectReference(ref), fc, sAddr, dchg, dupd);
if (val != null) {
if (val.equalsIgnoreCase("true") || val.equals("1")) {
bda.setValue(new Boolean(true));
bda.setValue(true);
} else if (val.equalsIgnoreCase("false") || val.equals("0")) {
bda.setValue(new Boolean(false));
bda.setValue(false);
} else {
throw new SclParseException("invalid boolean configured value: " + val);
}
@ -1071,7 +1071,7 @@ public class SclParser {
if (val != null) {
for (EnumVal enumVal : enumType.getValues()) {
if (val.equals(enumVal.getId())) {
bda.setValue(new Short((short) enumVal.getOrd()));
bda.setValue((short) enumVal.getOrd());
return bda;
}
}
@ -1083,7 +1083,7 @@ public class SclParser {
if (val != null) {
for (EnumVal enumVal : enumType.getValues()) {
if (val.equals(enumVal.getId())) {
bda.setValue(new Byte((byte) enumVal.getOrd()));
bda.setValue((byte) enumVal.getOrd());
return bda;
}
}

@ -26,7 +26,7 @@ public class Int16DataBind extends TextFieldDataBind<BdaInt16> {
@Override
protected void resetImpl() {
inputField.setText(new Short(data.getValue()).toString());
inputField.setText(Short.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int16UDataBind extends TextFieldDataBind<BdaInt16U> {
@Override
protected void resetImpl() {
inputField.setText(new Integer(data.getValue()).toString());
inputField.setText(Integer.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int32DataBind extends TextFieldDataBind<BdaInt32> {
@Override
protected void resetImpl() {
inputField.setText(new Integer(data.getValue()).toString());
inputField.setText(Integer.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int32UDataBind extends TextFieldDataBind<BdaInt32U> {
@Override
protected void resetImpl() {
inputField.setText(new Long(data.getValue()).toString());
inputField.setText(Long.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int64DataBind extends TextFieldDataBind<BdaInt64> {
@Override
protected void resetImpl() {
inputField.setText(new Long(data.getValue()).toString());
inputField.setText(Long.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int8DataBind extends TextFieldDataBind<BdaInt8> {
@Override
protected void resetImpl() {
inputField.setText(new Byte(data.getValue()).toString());
inputField.setText(Byte.toString(data.getValue()));
}
@Override

@ -26,7 +26,7 @@ public class Int8UDataBind extends TextFieldDataBind<BdaInt8U> {
@Override
protected void resetImpl() {
inputField.setText(new Short(data.getValue()).toString());
inputField.setText(Short.toString(data.getValue()));
}
@Override

@ -105,7 +105,7 @@ public class ReportingTest implements ClientEventListener {
Assert.assertNotNull(mag);
Assert.assertEquals(0, this.reportCounter);
mag.setFloat(new Float(3.0));
mag.setFloat(3.0f);
List<BasicDataAttribute> bdas = new ArrayList<>();
bdas.add(mag);
this.serverSap.setValues(bdas);
@ -161,7 +161,7 @@ public class ReportingTest implements ClientEventListener {
Assert.assertNotNull(mag);
Assert.assertEquals(0, this.reportCounter);
mag.setFloat(new Float(3.0));
mag.setFloat(3.0f);
List<BasicDataAttribute> bdas = new ArrayList<>();
bdas.add(mag);
this.serverSap.setValues(bdas);

Loading…
Cancel
Save