MID Temporal Evolution: Save report raises ClassCastException

Issue #480 resolved
Carmen Yago created an issue

When clicking on “Save Report” after selecting “Temporal Evolution“ java.lang.ClassCastException is raised:

“java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at org.openmarkov.gui.dialog.inference.temporalevolution.TemporalEvolutionReport.write(TemporalEvolutionReport.java:44)”

It seems to happen because cell values are cast to “Integer“ when some of them are “String” (the names of the variable states).

Comments (1)

  1. Jorge Pérez

    Fixed on commit 2a4db5e.

    As the time evolution report can be displayed conditional on a decision variable, the number of headers in the table may vary. Since the numeric cells must be correctly identified as integers (for cycles) or doubles (for values in the temporal evolution), we now first try to cast them, but if this cast fails, as a fallback, we store the data as a String.

  2. Log in to comment