Confusing signature of method sum(ArrayList<? extends Potential> tablePotentials) in class DiscretePotentialOperations

Create issue
Issue #26 resolved
Manuel Luque created an issue

The signature of method sum(ArrayList<? extends Potential> tablePotentials) in class org.openmarkov.core.model.network.potential.operation.DiscretePotentialOperationsDiscretePotentialOperations is confusing, because the actual implementation of the method assumes that the input argument is of type ArrayList<TablePotential>.

Thus, a call with an ArrayList<TreeADDPotential> as input argument compiles, but produces a ClassCastException in execution time.

Comments (2)

  1. Log in to comment