
Hi Clinton,
On Sun, Mar 14, 2010 at 11:29 PM, Mark Burton <markb@ordern.com> wrote:
Hey, that's a really great bug, it causes anonymous peaks to be named in honour of a bus stop!
This may be caused by the "def" (default value) and "height" filters. I believe the statement is attempting the following:
1. ${name|def:} use either the 'name' value, or as default '' (empty string).
2. ${ele|height:m=>ft|def:} Convert the elevation in meters to feet. If no 'ele' value is present, use an empty string.
I have a feeling that the empty string part may be misinterpreted right now. It could be that the last value found is instead used.
The relevant files are below, if you want to debug:
DefaultFilter.java - called for the 'def' filter.
HeightFilter.java - called for the 'height' filter (a subclass of ConvertFilter.java)
ValueBuilder.java - instantiates the filter classes. This would be a good place to start.
Thanks for the info - I started to nose around in that area but haven't got far - I shall take another look this evening. One thing that struck me was (somewhere in that code) I saw where it was testing to see if a passed in String value was null but it didn't test if it was zero-length. So, like you above, I wonder if the empty default value is causing problems. Cheers, Mark