null check

This commit is contained in:
bancika
2020-04-13 15:07:10 +02:00
parent d720f73887
commit 9963b7b3d3
11 changed files with 11 additions and 11 deletions
@@ -78,7 +78,7 @@ public class AirCoreInductor extends AbstractLeadedComponent<Inductance> {
@Override
public String getValueForDisplay() {
return getValue().toString();
return getValue() == null ? "" : getValue().toString();
}
public void drawIcon(Graphics2D g2d, int width, int height) {
@@ -87,7 +87,7 @@ public class AxialElectrolyticCapacitor extends AbstractLeadedComponent<Capacita
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@Deprecated
@@ -87,7 +87,7 @@ public class AxialFilmCapacitor extends AbstractLeadedComponent<Capacitance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@EditableProperty(name = "Voltage")
@@ -65,7 +65,7 @@ public class CapacitorSymbol extends AbstractSchematicLeadedSymbol<Capacitance>
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@Deprecated
@@ -84,7 +84,7 @@ public class InductorSymbol extends AbstractSchematicLeadedSymbol<Inductance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getCurrent() == null ? "" : " " + getCurrent().toString());
return (getValue() == null ? "" : getValue().toString()) + (getCurrent() == null ? "" : " " + getCurrent().toString());
}
public void drawIcon(Graphics2D g2d, int width, int height) {
@@ -72,7 +72,7 @@ public class RadialCeramicDiskCapacitor extends AbstractRadialComponent<Capacita
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@EditableProperty(name = "Voltage")
@@ -91,7 +91,7 @@ public class RadialElectrolytic extends AbstractRadialComponent<Capacitance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@Deprecated
@@ -72,7 +72,7 @@ public class RadialFilmCapacitor extends AbstractRadialComponent<Capacitance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@Deprecated
@@ -86,7 +86,7 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
}
@Deprecated
@@ -64,7 +64,7 @@ public class ResistorSymbol extends AbstractSchematicLeadedSymbol<Resistance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
}
@Deprecated
@@ -87,7 +87,7 @@ public class TantalumCapacitor extends AbstractRadialComponent<Capacitance> {
@Override
public String getValueForDisplay() {
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
}
@EditableProperty(name = "Voltage")