source: josm

Revision Log Mode:


Legend:

Added
Modified
Copied or renamed
Diff Rev Age Author
(edit) @18905   20 hours taylor.smock

i18n update

(edit) @18904   13 days stoecker

don't hardcode ID

(edit) @18903   13 days taylor.smock

Fix #23309: NPE in GeoPropertyIndex$GPLevel.getBounded when called by Territories.getRegionalTaginfoUrls

Territories.getRegionalTaginfoUrls uses Collection.parallelStream
which could cause the following race conditions:

  • children is reinitialized after the null check, potentially causing an NPE due to a different null check becoming false after it was checked. Solution: either synchronize the creation of children or have a local variable.
  • Two threads could generate a child and then generate children of children, creating a split tree hierarchy, only one of which would be kept. Solution: synchronize the creation of the child nodes

For both of the new synchronized methods, we could use a safe double-lock
idiom if there ends up being performance issues. This probably won't be the case.
Profiling JOSM start to end with Mesa County, CO (+ validations) did not show
that the modified methods were "hot".

This additionally fixes some lint issues and converts some package-private
methods to use ILatLon instead of LatLon.

(edit) @18902   2 weeks taylor.smock

remove TLD from IANA

(edit) @18901   2 weeks taylor.smock

remove TLD from IANA

(edit) @18900   2 weeks GerdP

fix #23310: TagChecker: Correct "peek" to "peak"
Patch provided by hhtznr

(edit) @18899   3 weeks stoecker

combine two loops (remove sonar warning)

(edit) @18898   3 weeks taylor.smock

See #18866: Remove Potlatch2 from the built-in styles

Remove an icon that was missed for the Potlatch2 style.

(edit) @18897   3 weeks taylor.smock

Add/Ignore popular tags

Add

  • informal=no -- this appears to be used for trails that appear to be informal=yes but are not.
  • highway=trailhead
    • Icon drawn by taylor.smock
  • amenity=letterbox
    • Additionally adds post:* tags, copied from addr:* tags
    • Icon drawn by taylor.smock; a better icon would be much appreciated
  • building=stadium -- added as a checkbox to leisure=stadium and the default building preset

Ignore

  • building=no -- this is already covered in unnecessary.mapcss
(edit) @18896   4 weeks taylor.smock

Fix #23235: Revert r18869

The URI specification only allows for ascii characters.
See https://datatracker.ietf.org/doc/html/rfc3986#section-1.2.1.

(edit) @18895   4 weeks taylor.smock

Fix #23057: data layers should be selected next, not non-data layers (patch by gaben, modified)

Modifications are as follows:

  • Fix test pollution uncovered by change in non-obvious determinate order of tests
  • Fix code so that MainLayerManagerTest.testRemoveLayerUnsetsActiveLayer passes
(edit) @18894   4 weeks taylor.smock

remove TLD from IANA

(edit) @18893   5 weeks taylor.smock

Fix #16567: Upgrade to JUnit 5

JOSMTestRules and JOSMTestFixture can reset the default JOSM profile, which can
be unexpected for new contributors. This updates all tests to use JUnit 5 and
the new JUnit 5 annotations.

This also renames MapCSSStyleSourceFilterTest to MapCSSStyleSourceFilterPerformanceTest
to match the naming convention for performance tests and fixes some lint issues.

This was tested by running all tests individually and together.

(edit) @18892   5 weeks taylor.smock

Fix #23257: MVTTileTest has an infrequently hit race condition (patch by marcello, modified)

The race condition is dependent upon calculation speed; if the layers get loaded
prior to the image loading, it is possible for us to get to the point where
we expect the image to be loaded, but it isn't yet.

Modifications are as follows:

  • Reinitialize tileSource and loader before each test, but initialize the cache once and clear that between tests.
(edit) @18891   5 weeks taylor.smock

Fix #23256: AbstractPrimitive::putAll not updating values (patch by marcello)

(edit) @18890   5 weeks taylor.smock

Fix #23256: AbstractPrimitive::putAll not updating values (patch by marcello, modified)

Modifications are as follows:

  • Unit tests were split out into discrete units for better test feedback in the future.
(edit) @18889   5 weeks taylor.smock

See #17858: Add Java 17 as an option for the Java version in deb packages

By depending upon default-jre with a version specification, we can avoid
hardcoding many specific Java JREs versions via |. Instead, we just indicate
that the default-jre must be >= 17 or the currently installed version must be
Java 8 compatible. This will change on 2023-12-31 when Java 8 support is dropped.
See #17858 for details.

This was verified via the following in an Ubuntu 23.04 container:

  1. curl -O https://josm.openstreetmap.de/apt/pool/universe/j/josm-latest/josm-latest_1.5.svn18887_all.deb
  2. ar x josm-latest_1.5.svn18887_all.deb control.tar.xz
  3. tar xf control.tar.xz control
  4. Edit control to match new control
  5. xz --decompress control.tar.xz && tar uvf control.tar control && xz control.tar
  6. ar r josm-latest_1.5.svn18887_all.deb control.tar.xz

The resulting deb package was then tested against Debian Buster, Bullseye,
Bookworm, Trixie, and Sid, along with Ubuntu 18.04, 20.04, 22.04, 23.04, and
23.10 with
podman run -it --rm --volume $(pwd):/mnt ${IMAGE} /usr/bin/bash -c "apt update && apt install -y /mnt/josm-latest_1.5.svn18887_all.deb && josm-latest --version && josm-latest --status-report"

(edit) @18888   5 weeks taylor.smock

See #18866: Remove Potlatch2 from the built-in styles

This fixes the MapRendererPerformanceTest that failed due to depending upon the
number of built-in paintstyles.

(edit) @18887   5 weeks taylor.smock

See r18885: Fix default hasTagDifferent implementation.

(edit) @18886   5 weeks taylor.smock

Fix #18866: Remove Potlatch2 from the built-in styles. It has been replaced with wiki:Styles/Potlatch2.

Users who have the built-in Potlatch2 style enabled when they upgrade to this
revision or later will automatically have wiki:Styles/Potlatch2 added to their
style list and enabled.

(edit) @18885   5 weeks taylor.smock

Fix #23252: Ignore line_management=transition|termination in UnconnectedPowerTest (patch by gaben, modified)

Modifications are as follows:

  • Lint fixes
  • Performance enhancements (profiling done with validator and an overpass download of Mesa County, Colorado)
    • Iterating over an array is much more efficient than using streams. For methods that may be frequently called, using Arrays.stream is currently not a good idea.
      • hasTagDifferent: 2.09 MB -> 0
      • hasTag: 125MB -> 0
      • hasKey: 879MB -> 0
(edit) @18884   5 weeks taylor.smock

See #23253: Ignore landuse=paddy

The tag usage currently appears to be from a mass edit, and is largely done by a
single user. The usages are also geographically concentrated in South Korea.

With that said, the wiki page (osmwiki:Tag:landuse=paddy) is pretty good.

(edit) @18883   5 weeks GerdP

Mention that Douglas-Peucker is used

(edit) @18882   6 weeks stoecker

showtime was another CBS tld and is gone as well

(edit) @18881   6 weeks stoecker

add import as other name for source

(edit) @18880   6 weeks stoecker

cbs domain died

(edit) @18879   6 weeks taylor.smock

See #23125: Add secret to GH action environment

(edit) @18878   6 weeks taylor.smock

Fix #23125: Update macos notarization

(edit) @18877   6 weeks taylor.smock

See #23220: Use jakarta.annotation instead of javax.annotation (JSR305)

jsr305 should be removed in June 2024 to give plugins time to migrate.

Some lint issues were also fixed.

(edit) @18876   6 weeks taylor.smock

See #23238: Some MapCSS functions cause NPEs when part of fixAdd

JOSM_Search doesn't trigger the issue unless the search string is non-empty.

(edit) @18875   6 weeks taylor.smock

Fix #23238: Some MapCSS functions cause NPEs when part of fixAdd

(edit) @18874   7 weeks taylor.smock

remove TLD from IANA

(edit) @18873   7 weeks taylor.smock

Fix #23240: Change tag man_made=mineshaft to man_made=heap for new man_made=heap preset

(edit) @18872   7 weeks stoecker

add man_made=heap

(edit) @18871   7 weeks taylor.smock

See #23218: Use newer error_prone versions when compiling on Java 11+

error_prone 2.11 dropped support for compiling with Java 8, although it still
supports compiling for Java 8. The "major" new check for us is NotJavadoc since
we used /** in quite a few places which were not javadoc.

Other "new" checks that are of interest:

  • AlreadyChecked: if (foo) { doFoo(); } else if (!foo) { doBar(); }
  • UnnecessaryStringBuilder: Avoid StringBuilder (Java converts + to StringBuilder behind-the-scenes, but may also do something else if it performs better)
  • NonApiType: Avoid specific interface types in function definitions
  • NamedLikeContextualKeyword: Avoid using restricted names for classes and methods
  • UnusedMethod: Unused private methods should be removed

This fixes most of the new error_prone issues and some SonarLint issues.

(edit) @18870   7 weeks taylor.smock

See #16567: Update to JUnit 5

This converts most tests to use @Annotations. There are also some performance
improvements as it relates to tests.

(edit) @18869   8 weeks taylor.smock

Fix #23235: Allow unicode characters in URL paths

(edit) @18868   8 weeks taylor.smock

See #16207: Keep track of download area for notes

(edit) @18867   8 weeks taylor.smock

See #16567: Update to JUnit 5

This adds the @TaggingPresets annotation used by r18866 (see #23196). The
annotation tries to only initialize the presets when the current preset list does
not have the same hashCode as the default preset list. In order for this to work,
TaggingPresets#getTaggingPresets had to return a List (the method contract
has not changed), which calculates the hashCode in a deterministic manner.

(edit) @18866   8 weeks taylor.smock

Fix #23196: DataIntegrityProblemException: Primitive must be part of the dataset

It turns out that FilterModel doesn't care whether a primitive's referrers are
in the dataset or not.

This additionally adds a non-regression test and modifies WindowMocker to cover
some more headless exceptions. This additionally lets us stop mocking
ExtendedDialog#setupDialog.

(edit) @18865   8 weeks stoecker

see #23228 - i18n update

(edit) @18864   8 weeks taylor.smock

Fix mistype for secondary_link where the display value was Secondary (patch by KorneySan, see GitHub PR #131)

(edit) @18863   8 weeks taylor.smock

Fix #23209: Add generator:type=boiler (patch by gaben)

(edit) @18862   8 weeks taylor.smock

Fix #23232: Improve handrail.svg icon (drawn by AntoninDelFabbro, modified)

It is easier to distinguish this new icon from the icon for benches.

Modifications are as follows:

  • Widen strokes to pixel sizes
  • Ensure that vertical/horizontal strokes are within pixel boundaries
(edit) @18861   8 weeks stoecker

remove hardcoded plugin Java versions, see #23218

(edit) @18860   8 weeks stoecker

see #23228 - add sidewalk context to Bus bay

(edit) @18859   8 weeks taylor.smock

Fix icon viewboxes

(edit) @18858   8 weeks taylor.smock

See #23218: Fix check-plugins (hardcoded excludes for plugins with min Java versions > 8)

Additional changes:

  • Tabs to spaces (SonarLint)
  • check-plugins can now be run on Java 20 (animal_sniffer does not yet support Java 21)
(edit) @18857   2 months taylor.smock

See #23218: Update proguard to 7.4.0-beta02 for Java 21 support

(edit) @18856   2 months taylor.smock

See #23218: Adapt rendering tests for Java 21

(edit) @18855   2 months stoecker

add some important tags

(edit) @18854   2 months taylor.smock

Fix regression from r18853: test-compile failing due to an import for JavaDoc

(edit) @18853   2 months taylor.smock

See #16567: Update to JUnit 5

This removes new JOSMTestRules() with no additional setup and most
JOSMFixture calls.

Removing the bare JOSMTestRules speeds up the test suite since there are two
fewer System.gc() calls per test.

(edit) @18852   2 months taylor.smock

Fix regression from r18847: Current tests expect a search for access= to match access=null and access="" (has key, but no value)

(edit) @18851   2 months taylor.smock

Fix #23203: Simplify Way dialog can cause a deadlock

This is caused by a write lock being acquired in SimplifyWayAction.actionPerformed
in the EDT and then a read lock is attempted to be acquired in a styled-map-renderer
thread. The styled-map-renderer thread is waited on by the EDT, which causes the
deadlock. The fix is removing the dataset write lock in SimplifyWayAction.actionPerformed
which was added back in 2011. An analysis of the code shows that the commands generated
lock the dataset themselves, so the dataset lock in SimplifyWayAction.actionPerformed
should no longer be necessary.

The deadlock does not happen reliably with only the JOSM default paintstyle; adding
additional paintstyles was required for the initial analysis.

(edit) @18850   2 months taylor.smock

Fix #23187: Don't show validation results panel when no issues will be shown

(edit) @18849   2 months taylor.smock

Fix #16485: Modal dialogs may occasionally be behind another dialog

From the Modality javadocs:

  • keeps its Z-order below the modal dialog that blocks it

Warning! Some window managers allow users to change the window Z-order in an arbitrary way — in that case the last requirement may not be met.

The workaround is to set the blocking dialog as always on top.

(edit) @18848   2 months taylor.smock

GitHub CI: Update java matrix (20, 21-ea -> 21, 22-ea)

(edit) @18847   2 months taylor.smock

Fix #23212: Overpass query wizard should transform key: to ["key"] instead of [~"key"~""]

This is fixed by using ExactKeyValue instead of KeyValue for key: queries.
As a happy side effect, this significantly reduces the cost of key: queries.
In a test area ("Mesa County, Colorado"), this reduces the cpu time from 2600ms
to 200ms and reduces memory allocations from 425mb to effectively 0 for a name:
query.

In addition, this simplifies many equals methods by converting the following
pattern to Objects.equals(first, second):

if (first == null) {
    if (second != null) {
        return true;
    }
} else if (!first.equals(second))
    return false;
return true;

There are some additional changes, mostly related to documentation and lint
issues.

(edit) @18846   2 months taylor.smock

Fix i18n issue introduced in r18843

(edit) @18845   2 months taylor.smock

Fix #23189: Conflict tag tables should resize with the conflict window

(edit) @18844   2 months taylor.smock

Fix some recently introduced issues

  • Fix some issues with updated presets, see r18843
  • Fix a HeadlessException issue in TagEditHelperTest#testTicket23191
(edit) @18843   2 months taylor.smock

Fix #23184: Add/ignore popular tags

Add

Ignore

  • check_date:?*: Used by surveying applications (fix #23182)
  • boundary=religious_administration: Not well documented

Replace

This additionally fixes an issue discovered by gaben in #23183, whereby
values_from="java.util.Locale#getISOCountries" could have some values
translated. This was fixed by adding a values_context attribute; in this case,
I used "country codes".

(edit) @18842   2 months taylor.smock

Fix #23191: NPE in AddTagsDialog

This is caused when a new layer is added via Remote Control while the add tag
dialog is open.

(edit) @18841   2 months taylor.smock

Fix #23183: Add country and target to office=diplomatic

country is needed to indicate which country the diplomatic office belongs
to, and target is needed for the cases where a diplomatic office is outside
the country the embassy owner is communicating with.

(edit) @18840   2 months taylor.smock

Revert r18838, see #23008: natural=coastline does not work well with the changes

This adds a test to ensure future changes don't break the natural=coastline
branch.

(edit) @18839   2 months taylor.smock

Fix #23179: Include changeset in note comment if feasible (patch by qeef, modified)

Modifications are as follows:

  • Unit tests
  • Better note matching
  • Find multiple changesets referring the same note
(edit) @18838   3 months taylor.smock

Fix #23008: Improve PowerLines test performance (patch by gaben)

(edit) @18837   3 months taylor.smock

Fix #23057: An invisible layer should not become active when removing a layer

(edit) @18836   3 months taylor.smock

Reduce memory allocations from SplashScreenProgressRenderer#setTasks

This reduces startup memory allocations from that method to effectively zero from
475 MB. There is a total reduction of ~580 MB (or ~1/3 of startup memory
allocations). This reduces the GC pressure significantly, and reduces startup
time by 2.5-3.8 seconds.

Most of the additional memory allocation reductions come from not needing to
repaint the text caret after the setTasks call.

(edit) @18835   3 months taylor.smock

Fix #22134: Only show cycle dashes on one side of roundabout

(edit) @18834   3 months taylor.smock

Fix #23149: Add line_arrangement to power supports presets (patch by gaben)

(edit) @18833   3 months taylor.smock

Fix #17052: Allow plugins to save state to session file

The primary feature request was for the TODO plugin to save the list elements for
a future session.

This allows plugins to register via ServiceLoader classes which need to be
called to save or restore their state.

In addition, this fixes an ordering issue with tests whereby the OsmApi cache
would be cleared, but the FakeOsmApi class would not recache itself when called.

(edit) @18832   3 months stoecker

JavaDoc

(edit) @18831   3 months taylor.smock

Fix #23112: Expand visibility of some objects and methods in JCSCachedTileLoaderJob for plugin subclasses

(edit) @18830   3 months taylor.smock

Fix #23111: Hoist the common acceptsDocumentationSummary DownloadTask method definition into the interface

(edit) @18829   3 months taylor.smock

Fix #16998: Add parent_osm_primitives and convert_primitives_to_string

(edit) @18828   3 months taylor.smock

See #22810: OSM OAuth 1.0a/Basic auth deprecation and removal

This prevents users from using Basic Authentication or OAuth 1.0a unless one of the following is true:

  • They were previously using the authentication method
  • They have enabled Expert Mode
  • They are not using the default OSM API
(edit) @18827   3 months taylor.smock

See #23165: Use test file with smaller (Integer.MAX_VALUE) changeset id

(edit) @18826   3 months taylor.smock

Fix #23165: Cannot assign a changesetId > 0 to a new primitive

There were two problems:

  1. Using Number.intValue instead of Number.longValue
  2. Using >> instead of >>> (bit shift)
(edit) @18825   3 months taylor.smock

Fix #23169: NPE when running validator with no validations enabled

(edit) @18824   3 months taylor.smock

Fix #23153: Remote Control API call is adding hashtags many times

This occurs due to adding the hashtags to the comment multiple times.

This is fixed by doing the following:
1) When finding hashtags from a comment, only return the distinct hashtags
2) When adding hashtags from the dataset, only add hashtags that are not already

part of the comment.

(edit) @18823   3 months taylor.smock

Improve performance for TaggingPresetSelector$PresetClassifications.getMatchingPresets

This was found when profiling with the Name Suggestion Index enabled.

The improvements are as follows:

  • ~80% reduction in CPU usage
  • ~85% reduction in memory allocations

A good chunk of the remaining cpu cycles and memory allocations is from the sort
operation.

Non-performance related changes are as follows:

  • Add documentation
  • Lint fixes
(edit) @18822   3 months taylor.smock

i18n update

(edit) @18821   3 months taylor.smock

Fix #23140: RejectedExecutionException when MultiFetchServerObjectReader is cancelled while creating download jobs

This was caused by a race condition.
User starts a download, and cancels it as jobs are submitted to the thread pool.
The next job to be submitted will cause a RejectedExecutionException. In order
to fix this, we ensure that we shutdown the thread pool inside a synchronized
block, and add jobs to the executor inside a synchronized block.

(edit) @18820   3 months taylor.smock

Fix #23138: Add characters for Lushootseed to TagChecker#isAllowedPhoneticCharacter

(edit) @18819   3 months taylor.smock

See #22652, r18817: Stop parsing gpx files when point elements have invalid coordinates

This adds back the wpt check that was temporarily removed in r18818 to get back
to the previous "known good" state and additionally adds checks for rtept and
trkpt elements.

This also removes a change to build.xml that was accidentally committed in r18818.
The specific change (adding Automatic-Module-Name to the JOSM manifest) will
probably be done in a separate commit in the future.

(edit) @18818   3 months taylor.smock

Fix tests

(edit) @18817   3 months taylor.smock

Fix #22652: Stop parsing gpx files when wpt elements do not have valid coordinates

This does move the parsing code out of GpxReader into GpxParser and refactors it
so that it is (hopefully) easier to understand and debug.

(edit) @18816   3 months taylor.smock

Fix #23134: Cancelling a json download will cause an exception dialog

We extract the underlying IOException from the JsonException into an
IllegalDataException which can be parsed by calling methods and properly handled.

(edit) @18815   4 months taylor.smock

Improve paste behavior of large amounts of data

Both SelectionListDialog and MapStatus can use the consolidated events, which
drastically reduces the amount of time spent pasting large amounts of data. This
reduces the time spent in their listener methods by >99%.

The test paste of 41k objects took ~20s after the change and ~80s prior to the change.

A good chunk of the remaining time spent pasting is from checking to see whether
an upload is needed. Fixing that will take a lot more work, since there is
currently no concept of consolidated events for that specific listener type.

This was found while investigating #4145.

(edit) @18814   4 months taylor.smock

Fix #23105: Add action to select shared/common child objects (patch by Woazboat, modified)

Modifications are as follows:

  • Basic test added
  • Icon added (copied and modified from selectall.svg)
  • default methods for IPrimitive.getChildren were moved to the appropriate locations
  • Lint cleanups in modified files

Additional notes:

  • The behavior when only one way is selected is very similar to SelectWayNodesAction from utilsplugin2
(edit) @18813   4 months taylor.smock

See #22832: Don't quote $JPACKAGEOPTIONS

(edit) @18812   4 months taylor.smock

Fix #23110: Add cash_in to amenity=atm

This also ignores some tags.

(edit) @18811   4 months taylor.smock

Fix #23124: Azul Java 17.0.4.1 will cause a NumberFormatException

Java can have multiple dots instead of just two. Specifically, the Java version
specifier is $MAJOR.$MINOR.$SECURITY.$PATCH.

Previously, we assumed that there would only ever be two dots in the version
specifier, and got the first and last dot. Now we get the first and second dot.

In addition, this fixes some lint issues.

(edit) @18810   4 months taylor.smock

Dependency updates

  • jakarta.json-api: 2.1.1 -> 2.1.2
  • org.eclipse.parsson: 1.1.1 -> 1.1.4
    • Fix an SOE caused by parsing an untrusted string
  • org.apache.commons-lang3: 3.12.0 -> 3.13.0
    • Various bugfixes and enhancements
  • io.github.classgraph: 4.8.158 -> 4.8.162
    • Better support for MRJars
  • JUnit 5.9.3 -> 5.10.0
    • Stacktrace pruning to hide internal JUnit calls
(edit) @18809   4 months taylor.smock

See #23125: Prefer notarytool if it is available; fall back to altool if it is not

The altool notarization process will stop working in the next few months, so we
need to switch to notarytool.

For now, we will try to use notarytool, and if I messed up the command line,
it should fall back to altool.

(edit) @18808   4 months stoecker

move nodes count into own function, so it can be changed in a sub class

(edit) @18807   4 months taylor.smock

Allow importing geojson files that were saved to a session file

  • GeoJSONImporter now extends OsmImporter instead of FileImporter and deprecates the parseDataSet(String) method.
(edit) @18806   4 months taylor.smock

Fix #23119: NPE in RemoteEntry.getLastModified

Note: See TracRevisionLog for help on using the revision log.