Skip to content
Permalink
Browse files

manager spotbugs

  • Loading branch information...
icklesteve committed May 29, 2019
1 parent 18103ea commit 1a55d02564c426f792353f3be5382f59f1d10dea
@@ -51,9 +51,11 @@ public IdTagTableAction(String actionName) {
*/
@Override
public void setManager(@Nonnull Manager<IdTag> t) {
tagManager = (IdTagManager) t;
if (m != null) {
m.setManager(tagManager);
if (t instanceof IdTagManager) {
tagManager = (IdTagManager) t;
if (m != null) {
m.setManager(tagManager);
}
}
}

@@ -95,7 +95,12 @@ public LightTableAction() {
/** {@inheritDoc} */
@Override
public void setManager(@Nonnull Manager<Light> man) {
lightManager = (LightManager) man;
if (man instanceof LightManager) {
lightManager = (LightManager) man;
if (m != null) {
m.setManager(lightManager);
}
}
}

/**
@@ -58,7 +58,12 @@ public ReporterTableAction(String actionName) {
*/
@Override
public void setManager(@Nonnull Manager<Reporter> man) {
reportManager = (ReporterManager) man;
if (man instanceof ReporterManager) {
reportManager = (ReporterManager) man;
if (m != null) {
m.setManager(reportManager);
}
}
}

public ReporterTableAction() {
@@ -69,9 +69,11 @@ public SensorTableAction() {
*/
@Override
public void setManager(@Nonnull Manager<Sensor> s) {
senManager = (SensorManager) s;
if (m != null) {
m.setManager(senManager);
if (s instanceof SensorManager) {
senManager = (SensorManager) s;
if (m != null) {
m.setManager(senManager);
}
}
}

@@ -139,7 +139,12 @@ public TurnoutTableAction() {
*/
@Override
public void setManager(@Nonnull Manager<Turnout> man) {
turnManager = (TurnoutManager) man;
if (man instanceof TurnoutManager) {
turnManager = (TurnoutManager) man;
if (m != null) {
m.setManager(turnManager);
}
}
}

static public final int INVERTCOL = BeanTableDataModel.NUMCOLUMN;

0 comments on commit 1a55d02

Please sign in to comment.
You can’t perform that action at this time.