#20741 closed enhancement (fixed)
[patch] Code improvements
Reported by: | gaben | Owned by: | simon04 |
---|---|---|---|
Priority: | minor | Milestone: | 21.04 |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
While I looked for JOSM core functionality, found these minor issues and fixed them. There is no intended functionality change, only semantics.
Attachments (1)
Change History (11)
by , 4 years ago
Attachment: | josm_20741.diff added |
---|
follow-up: 4 comment:1 by , 4 years ago
follow-ups: 3 5 comment:2 by , 4 years ago
My understanding of the "TODO: convert this to switch/case and make sure the parsing still works" is that there is a script which parses the java source to extract the shortcuts and this script may not work. I don't know know how to make sure. Do you?
comment:3 by , 4 years ago
I think the script might be hidden on the server somewhere, and not in the source, so I can't check. I don't know who has server access. I think don-vip and stoecker have access, but I don't know about anyone else.
comment:4 by , 4 years ago
Replying to taylor.smock:
Just out of curiosity, why did you change L816 in src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java like so:
IntelliJ by default reports the warning "'catch' parameter named 'ignore' is used", but those warnings are configurable.
comment:5 by , 4 years ago
Replying to taylor.smock:
Just out of curiosity, why did you change L816 in src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
As Simon said, by default those reported by IntelliJ. An error is ignored by inspection definition when it's not used in the catch block, example: trunk/src/com/kitfox/svg/xml/XMLParseUtil.java#L359.
Replying to GerdP:
Speaking of the removed TODO, I have no idea, the script is probably not public. At least you can test if it still works :)
comment:6 by , 4 years ago
Milestone: | → 21.04 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:9 by , 4 years ago
I've split your patch in two commits. I've excluded the ignore
exception variable name, and the patch around "TODO: convert this to switch/case and make sure the parsing still works" (since I cannot).
comment:10 by , 4 years ago
Thank you and sorry for the extra work. I was having issues keeping the patch up to date because you made changes faster than I found issues 😄
Just out of curiosity, why did you change L816 in src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java like so:
ignore
seems to be fairly clear as to why we continue without re-throwing, wheree
isn't.