[osmosis-dev] TagFilter
Brett Henderson
brett at bretth.com
Thu Dec 3 11:35:13 GMT 2009
On Thu, Dec 3, 2009 at 3:24 AM, Andrew Byrd <andrew at fastmail.net> wrote:
> Andrew Byrd wrote:
>
>> Brett Henderson wrote:
>>
>>> Hi Andrew,
>>>
>>> Have you made any more changes since your original patch? Should I apply
>>> it yet?
>>>
>>> Brett
>>>
>>
> Ah, one thing is that there's some debug code that prints out details about
> the filters as they are created. These lines can be deleted, or the DEBUG
> variable set to false, since it isn't tested in the 'inner loop', only
> during filter creation.
>
> I'll make some documentation and put it on the wiki when I see the patch in
> SVN.
>
Hi Andrew,
I've just tried to apply the patch but ran into a few problems.
* Can you please run "ant checkstyle" and fix any errors that pop up? These
errors are currently breaking the build. Most are code formatting issues
and should be fairly easy to fix. You can configure eclipse to highlight
checkstyle issues if you install the checkstyle eclipse plugin.
* There is a compilation warning. At least there is in Eclipse. There is a
"private Class filterClass" variable in TagFilter that has a warning because
Class is a generic type and no type is specified. You can fix it with
something like "private Class<? extends EntityContainer> filterClass".
* Code should never write to System.out or System.err. System.out in
particular is bad because it corrupts data if piping data between apps. The
debug statements you referred to can be kept but change them to use JDK
Logging. You can use a class like PostgreSqlDatasetTruncator as an
example. The type of logging you're writing out would probably be suitable
for a "finer" level of logging.
* Do you have any unit tests? Nothing too extravagant is required, but a
couple of simple tests would be very helpful.
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20091203/d87c0859/attachment.html>
More information about the osmosis-dev
mailing list