You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Encoder case sensitivity bug in GraphHopper.getWeightingForCH #496
The first line of GraphHopper.getWeightingForCH method is missing a toLowerCase() call. In case of one or more upper case letters, the matching fails as the resulting variable encoderStr is compared to a string representation of Weighting that is converted to lower case:
public Weighting getWeightingForCH( WeightingMap weightingMap, FlagEncoder encoder )
{
String encoderStr = encoder.toString(); <-- MISSING toLowerCase()
String weightingStr = weightingMap.getWeighting().toLowerCase();
for (Weighting w : algoFactories.keySet())
{
// TODO too loose matching? see #490
String str = w.toString().toLowerCase();
if (str.contains(weightingStr) && str.contains(encoderStr))
return w;
}
Activity
devemux86 commentedon Aug 14, 2015
Related to #490.
fixing #496, proper fix later with #490