The old code in sootup.core.model.Position.equals always casts the passed argument to a FullPosition. However, in theory, it is possible that there are multiple subclasses of Position. Hence, the cast could potentially result in a CCE. In order to avoid this, just cast the passed argument to Position itself, which is always safe (due to the previous checks).
The old code in sootup.core.model.Position.equals always casts the passed argument to a FullPosition. However, in theory, it is possible that there are multiple subclasses of Position. Hence, the cast could potentially result in a CCE. In order to avoid this, just cast the passed argument to Position itself, which is always safe (due to the previous checks).