#17219 closed defect (fixed)
[Patch] TagChecker.isTagInPresets() doesn't work
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 19.01 |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
Javadoc says that it returns true "if the given tag is in internal presets"
In fact it returns true if the given tag key is in the presets.
The patched version causes unit test TaginfoTestIT.testCheckPopularTags() to fail as it now finds some values which are not in the presets.
Attachments (2)
Change History (11)
by , 6 years ago
Attachment: | 17219.patch added |
---|
comment:1 by , 6 years ago
Summary: | Checker.isTagInPresets doesn't work → [Patch] Checker.isTagInPresets doesn't work |
---|
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Yes, would be an alternative. Anyway, the code requires more changes when this fixed, else we'll see thousands of new errors.
Working on it...
comment:4 by , 6 years ago
I don't think the patch is correct. What happens when calling the method with name=foobar
?
comment:6 by , 6 years ago
My understanding is this: We have presets where we have a list of values, and we have presets where we only have a key.
So, isTagInPresets(String key, String value)
should only return true if the combination of both is in the presets, while
isKeyInPresets(String key)
should return true even if no values are present.
by , 6 years ago
Attachment: | 17219-v2.patch added |
---|
comment:7 by , 6 years ago
Summary: | [Patch] Checker.isTagInPresets doesn't work → [Patch] TagChecker.isTagInPresets() doesn't work |
---|
v2 of the patch works with the existing unit tests and produces the same results in JOSM validator. If I hear no complains I'll commit it this evening.
comment:9 by , 6 years ago
Milestone: | → 19.01 |
---|
Hmm, shouldn't probably that values.isEmpty() be an value.isEmpty()?