Repository navigation
make CHProfile selection pluggable - #1797
Conversation
| continue; | ||
| } | ||
| if (!vehicle.isEmpty() && !getVehicle(p).equals(vehicle)) { | ||
| if (!p.getWeighting().matches(hintsMap)) { |
There was a problem hiding this comment.
If we do this we probably should use .matches() also a few lines below (lines 80+81)
There was a problem hiding this comment.
In lines 80+81 we compare 2 Weightings, but here we want to know "if the HintsMap matches the Weighting". So, to use the matches method we would need
getWeighting().matches(hintsMap) && getWeighting().matches(hintsMap)
and still both Weighting objects could be different. Should we do this? Or, to remove the vehicle comparison, we could use the Weighting.equals method instead of String.equals?
There was a problem hiding this comment.
Maybe we can get rid of Weighting#matches altogether :)
There was a problem hiding this comment.
Yeah, have created a separate issue as this seems to be quite involved: #1800
Will merge this here for now if no objections :) ?
minor improvement for #1790 to call Weighting.matches again. A disadvantage could be that Weighting.matches is now less strict.