source: josm

Revision Log Mode:


Legend:

Added
Modified
Copied or renamed
Diff Rev Age Author
(edit) @19159   4 months taylor.smock

i18n updates

(edit) @19158   4 months taylor.smock

See #14649: Drop certificate amendment for Netherlands

www.nationaalgeoregister.nl is properly setup to have the trust chain and uses
QuoVadis Root CA 2, which is in the default Java trust store.

Furthermore, geodata.nationaalgeoregister.nl is no longer a registered
subdomain. In addition, our map backgrounds make no references to that subdomain.

(edit) @19157   4 months taylor.smock

Fix #23600: Replace macos-14 with macos-latest in GitHub actions for building mac release files

GitHub macos-latest is now equivalent to macos-14.

(edit) @19156   4 months taylor.smock

Fix functional tests broken by r19152

(edit) @19155   4 months taylor.smock

Fix tests broken by r19152

(edit) @19154   4 months taylor.smock

Fix #23822: Remove tofix from plugins

The service hasn't been maintained for years

(edit) @19153   4 months taylor.smock

Fix #23821: Ensure that a new layer is loaded prior to loading additional data to that layer

This occurred due to a race condition, whereby the /load_and_zoom call would
return immediately prior to the download finishing for the new layer and the
next /load_and_zoom call merging onto a pre-existing layer.

This could be fixed in one of two different ways:

  1. Block the RemoteControl thread
  2. Have some method for ensuring that a new layer is loaded first

While we are effectively doing (1), it was easier to do (2) as well for testing
purposes. This means the RemoteControl thread could spin off a thread for each
request to /load_and_zoom and this particular issue should not reappear.

This does not control for cases where a user calls /load_and_zoom like so:

  1. new_layer=true + layer_name=first
  2. new_layer=true + layer_name=second
  3. new_layer=false + layer_name=first
  4. new_layer=false + layer_name=second

Both (1) and (2) will complete before (3) and (4) are run. However, both (3) and
(4) will be loaded into the last layer loaded.

(edit) @19152   4 months taylor.smock

See #23821: Refactor LoadAndZoomHandler and add tests

This fixes some lint issues, specifically in regard to method complexity.

(edit) @19151   4 months stoecker

adapt message, patch by Famlam, see #23621

(edit) @19150   4 months taylor.smock

Bump error prone from 2.29.2 to 2.29.2

This fixes an issue where the utilsplugin2 plugin would fail to build.
For additional details, see https://github.com/google/error-prone/issues/4479 .

(edit) @19149   4 months taylor.smock

Bump error prone from 2.29.0 to 2.29.1

This fixes an issue where the PBF plugin would fail to build.
For additional details, see https://github.com/google/error-prone/issues/4475 .

(edit) @19148   4 months taylor.smock

Dependency updates

ivy.xml

  • Remove old dependencies (javax.json, jsr305 -- fixes #23220)
  • JMapViewer: 2.19 -> 2.20 - fixes deadlock when Bing attribution cannot be loaded (see #23721)
  • Wiremock: 3.6.0 -> 3.8.0
  • Various other minor dependency updates
(edit) @19147   4 months GerdP

fix #23392: JOSM doesn't work well when not maximized

  • use SwingUtilities.invokeLater() for the AlignImageryPanel
(edit) @19146   4 months taylor.smock

Fix #23811: ant jdeps was broken (patch by mfloryan)

(edit) @19145   4 months taylor.smock

Fix #23721: Application hangs indefinitely if Bing API unavailable

This adds a progress monitor that the user can cancel if Bing attribution doesn't
load quickly enough. This additionally removes the need for Thread.sleep calls
by using a timer thread.

This requires an update to the JMapViewer dependency.

(edit) @19144   4 months taylor.smock

Fix #23809: Desktop.getDesktop().browse can throw an UnsupportedOperationException

This probably was never a problem previously because xdg-open was tried first
(see #23804 for why that changed).

(edit) @19143   4 months taylor.smock

Fix #23804: xdg-open can return a 0 exit code when a browser doesn't open

This is alleviated by switching the default order of browser.unix to be
#DESTKOP then xdg-open. #DESKTOP is our magic value for using built-in
Java methods for opening a browser.

It appears that there is a race condition somewhere for the Brave browser.
I suspect that the process returned by the Runtime.exec and xdg-open isn't
actually complete when it says it is, and so the process is cleaned up prior to
Brave actually launching.

(edit) @19142   4 months taylor.smock

Fix OAuth2 tests

(edit) @19141   4 months taylor.smock

See #23804: Try to detect common failures with OpenBrowser.displayUrl

In #23804, the user indicated that the web browser did not open, so they were
unable to go through the automatic authentication flow. This attempts to work
around that problem by detecting caught exceptions and showing the user a dialog
that will allow them to copy the authorization URL.

(edit) @19140   4 months stoecker

adapt height rules to use siunit_length - patch by gaben, fix #23781

(edit) @19139   4 months taylor.smock

PMD and checkstyle fixes

(edit) @19138   4 months taylor.smock

remove TLD from IANA

(edit) @19137   4 months stoecker

add iD and Rapid to editor sync

(edit) @19136   4 months taylor.smock

See #23754: Fix test for UploadPrimitivesTask

(edit) @19135   4 months GerdP

fix #23754: JOSM fails to upload exactly 30000 changes in chunks of 10000

  • don't compare collection sizes() because they are changed in different situations
(edit) @19134   4 months taylor.smock

Fix broken Tag2Link test (due to external reordering of preferred links)

(edit) @19133   4 months taylor.smock

See #23727, #23748: Re-enable Map.ofEntries for Utils#toUnmodifiableMap

This restores the behavior that was present prior to r19101 without reflection.

In r19100 and earlier, the NPE was caught and rethrown as a reflection exception.
At this point, we then returned a Collections.unmodifiableMap object.

(edit) @19132   5 months taylor.smock

Fix #23765: Update tag2link resources

(edit) @19131   5 months taylor.smock

See #23785: Log when an imagery layer is removed due to validity reasons

(edit) @19130   5 months taylor.smock

Fix #23789: Missing space between two translated strings.

(edit) @19129   5 months stoecker

add Check for trees that are too big, patch by gaben, fix #23621

(edit) @19128   5 months stoecker

update i18n

(edit) @19127   5 months GerdP

see #23738 comment:26

  • make Cancel button work when using "Upload each object individually"
(edit) @19126   5 months GerdP

fix #23738: Mass upload: JOSM tries to upload changes even though changeset is already closed

  • while filling the changeset check if the maximum size is reached so that JOSM doesn't attempt to upload more than the maximum allowed objects
  • throw ChangesetClosedException to handle the automatic close of the changeset on server side
(edit) @19125   5 months GerdP

see #23748: NPE: Reverse way direction: Automatic tag correction

  • add null value in unit test
(edit) @19124   5 months GerdP

fix #23748: NPE: Reverse way direction: Automatic tag correction
(furter already expected regrression from r19101)

  • don't use Map.ofEntries() when map may contain null keys or values

I try to write a unit test for this as well

(edit) @19123   5 months GerdP

fix #23728: First geotagged image not fully selected

  • remove code in GeoImageLayer constructor which more or less randomly opens the ImageViewerDialog
  • fix layer actions "Jump to next marker" and "Jump to previous marker" so that they open or update the image viewer dialog
  • new code to check if a new geoimage layer was added by any open file or drag/drop action and - if so - to open the first image of the topmost new geoimage layer. If ImageViewerDialog is already open a new tab is added.
(edit) @19122   5 months stoecker

fix #23745 - add more icons, patch by gaben

(edit) @19121   5 months taylor.smock

See #17858: Replace most calls to StandardCharsets.UTF_8.name() with StandardCharsets.UTF_8

This (in many cases) also removes catches for UnsupportedEncodingException.

(edit) @19120   5 months taylor.smock

See #17858: Update code for newer Java features

Also add a note that toUnmodifiableList does not like nulls.

(edit) @19119   5 months GerdP

fix #23735: Combine ways refused
(patch 23735-2.patch)

  • rewrite check so that it checks if the parents of the combined ways are known instead of the parents of the connection node(s)
  • show dialog with hint about download parents action that allows to continue

TODO: implement full automatic download of parents in all relavant action or add download button in the common dialog.

(edit) @19118   5 months taylor.smock

See #23743: MinimapDialogTest was failing

This re-adds parameter resolution for DownloadWmsAlongTrackActionTest

(edit) @19117   5 months taylor.smock

Fix #23743: MinimapDialogTest was failing

This does two things:

  1. Remove hack that is no longer necessary with wiremock 3.6.0
  2. Create a copy of the layer list
(edit) @19116   5 months GerdP

fix #23648: Not possible to save a layer after marked as "Discourage upload"

  • mark layer as changed and show notificaton when the toggle was triggered
  • remove overwrite of SaveActionBase.updateEnabledState() for "Save"
(edit) @19115   5 months taylor.smock

Fix some checkstyle issues

(edit) @19114   5 months taylor.smock

Fix an XPath injection issue

This isn't really an issue for JOSM, since we are only reading from public remote
sources.

(edit) @19113   5 months taylor.smock

Update PMD to 7.2.0

A bunch of rules were deprecated and replaced and the XPath expressions had to be updated from XPath 1 to XPath 3.

(edit) @19112   5 months stoecker

javadoc fixes

(edit) @19111   5 months taylor.smock

remove TLD from IANA

(edit) @19110   5 months taylor.smock

See #17858, see #8888: Remove useLegacyMergeSort from josm-latest.jnlp

Setting java.util.Arrays.useLegacyMergeSort to true is probably no longer
necessary.

This does not update josm.jnlp just in case; the JNLP files may be automatically
updated (I'm not certain).

(edit) @19109   5 months taylor.smock

See #17858: Remove old workarounds for javabugs and update Utils#getLatestVersion

  • JDK-8180379: Fixed in Java 9+
  • JDK-8251377: Fixed in Java 11.0.14 (2021-09-02)
  • JDK-8262085: Fixed in Java 11.0.17 (2022-07-19)
(edit) @19108   5 months taylor.smock

Cleanup some new PMD warnings from PMD 7.x (followup of r19101)

(edit) @19107   5 months taylor.smock

Replace most calls for getNodes in VectorWay with direct calls to underlying list

This is primarily to avoid new unmodifiable collection instantiations where we
don't need a copy of the list. This significantly reduces the cost of the
post-processing merge ways step. Specifically, there is a 55% drop in the memory
cost, and 90% fewer CPU cycles.

(edit) @19106   5 months taylor.smock

Cleanup some new PMD warnings from PMD 7.x (followup of r19101)

(edit) @19105   5 months stoecker

Explain what to do

(edit) @19104   5 months taylor.smock

Fix #23731: Don't close output stream (patch by GerdP, modified)

The major modification is the addition of @SuppressWarnings.

(edit) @19103   5 months taylor.smock

Cleanup some new PMD warnings from PMD 7.x (followup of r19101)

(edit) @19102   5 months taylor.smock

Revert Utils.toUnmodifiableList changes from r19101 (see #23727, patch by GerdP, modified with extra context)

(edit) @19101   5 months taylor.smock

Cleanup some new PMD warnings from PMD 7.x

I haven't updated to PMD 7.x in ivy/maven yet since I still have 83 PMD violations
to go through, and I don't know (yet) if any of them were supposed to be ignored
by the xpath expressions in tools/pmd/josm-ruleset.xml.

I may re-enable some of the PMD checks I've temporarily disabled prior to committing
the update for PMD.

Additionally cleanup some SonarLint issues in the modified files.

(edit) @19100   5 months taylor.smock

Fix #23725: Drop Java 8 code in WinRegistry

(edit) @19099   5 months taylor.smock

Fix #23717: Manual OAuth 2 authorization was not working

(edit) @19098   6 months GerdP

fix #23645: ChangesetCache: Is it useful as it is? Why isn't it always used?

  • use/update ChangesetCache when downloading changeset in HistoryBrowser
(edit) @19097   6 months taylor.smock

Fix #8269: Add initial maven pom files

This additionally deletes most IDE specific configuration, in favor of Maven
configuration.

We did have to update scripts/BuildProjectionDefinitions.java so that it would
create an empty EPSG file for the next run in the pom.xml file.

For core, we needed two additional pom.xml files:

  • A parent pom with most dependency information (for inheritance)
    • This will make it easier to keep core and the apache-commons plugin in sync
  • A unit test pom (for plugin tests)
    • Some IDEs (netbeans specifically) don't like this.

What this does not do:

  • Convert from ivy to maven for dependency management in core. This should happen eventually with maven-resolver-ant-tasks (probably with the next dependency update).
  • Deprecate the current ant scripts.
(edit) @19096   6 months taylor.smock

Fix #23677: Move PrimitiveData serialization back from AbstractPrimitive

(edit) @19095   6 months taylor.smock

Fix #23707: Remove basic auth for openstreetmap.org

This does the following:

  • On startup, if the current API is set to the default OSM API url, osm-server.{auth-method|username|password} are set to null, clearing them

from the saved preferences.xml file.

  • In preferences, if the OSM API is set to the default OSM API url, the basic auth radio button is disabled (if it is not currently selected or the current auth method). This is done since some users contribute to both OSM and some other project, which may still support basic authentication.
(edit) @19094   6 months stoecker

PMD and checkstyle

(edit) @19093   6 months stoecker

typo

(edit) @19092   6 months stoecker

fix #23702, see #23621 - improve length unit conversion

(edit) @19091   6 months taylor.smock

i18n updates

(edit) @19090   6 months stoecker

fix deprecation version of previous entry

(edit) @19089   6 months stoecker

see #23621 - add unit conversion for length values

(edit) @19088   6 months taylor.smock

See #22590, #23055, and #23697: Add additional information to bug report to (hopefully) figure out what is going on

This additionally reduces duplicated code, where the duplicated code differed
only in a few variables.

(edit) @19087   6 months stoecker

Hmm, am I the only one who finds junit output very confusing?

(edit) @19086   6 months stoecker

fix some test failures

(edit) @19085   6 months taylor.smock

Fix #23687: Freeze when opening Add Tag dialog

This occurs when the following are true:

  • The EDT is in a blocking dialog where a DataSet write lock is held
  • The EDT decides to repaint the mapview
  • The style caching occurs on a different thread

Why is this a problem?
The style caching waits for a read lock in a different thread, which will never
happen since the EDT has a write lock. The try-catch block that checks to see if
the current thread can get a read lock does not work on a thread that already has
a write lock, since that thread will always be able to obtain a read lock.

There are two solutions to this:

  1. Change the style caching code such that it times out after some period of time and then retries in the EDT (to avoid recurrent timeouts)
  2. Change TagEditHelper such that the blocking dialog is not in a block which holds a DataSet write lock


Option 2 is better, since it fixes the root cause; option 1 may need to be done
in the future, if only to allow for bug reports.

(edit) @19084   6 months taylor.smock

Update wiremock to 3.5.4 and use the correct org

(edit) @19083   6 months stoecker

fix text

(edit) @19082   6 months taylor.smock

Fix intermittent test failures

This fixes at least one cause of the intermittent test failures.
The root cause is a thread creating an ImageViewerDialog instance after the
teardown method was called.

(edit) @19081   6 months taylor.smock

Fix backbard typo (patch by gaben)

(edit) @19080   6 months taylor.smock

See #23671: Deprecate Utils#isBlank and replace instances of it with Utils#isStripEmpty

As noted in r19079, the two functions were identical in behavior.

(edit) @19079   6 months taylor.smock

See #23671: Significantly improve performance of Utils.isBlank and Utils.isStripEmpty along with reducing intern cost when loading files

From Utils, isBlank and isStripEmpty are functionally similar; both take a
string and check for the same whitespace characters. Specifically, the code flow
for isBlank calls strip, which uses DEFAULT_STRIP as additional characters
to remove. strip eventually calls isStrippedChar to determine whether or not
to keep a character. isStrippedChar checks DEFAULT_STRIP always, so the
returns from Utils.isBlank and Utils.isStripEmpty should always be the same.

Since the two functions are the same, we change isBlank to point at
isStripEmpty, and isStripEmpty now calls String.isBlank prior to checking
every character. String.isBlank is a built-in method, and is thus more likely
to be well-optimized by the JVM. In the event that it returns false, we want to
avoid any additional work, so we use a traditional for loop instead of a stream;
we will usually know within a character or two whether or not the string is empty.
With a stream, we first have to construct the stream, then iterate through it.

In AbstractReader, we create a map of strings to interned strings to avoid
calling String.intern too often -- despite being something we want to do fairly
frequently. Part of the (current) problem with String.intern is that it uses a
ConcurrentHashTable, so it "costs" more to use. The HashMap (even with the
cost of the lambdas) is ~25% of the CPU cost of interning, given sufficiently
duplicated data.

(edit) @19078   6 months taylor.smock

Fix #4142: Track fully downloaded objects (patch by stoecker, GerdP, and myself)

The serialization move from PrimitiveData to AbstractPrimitive should be
reverted prior to 24.05 (see #23677).

The serialization move was required since we want to ensure that all downstream
users of AbstractPrimitive were not using the flags field, which was done by
making the field private instead of protected. They may still be using that
field (via updateFlags) which would not be caught by compile-time or runtime
errors.

Additionally, a good chunk of common functionality was moved up from
OsmPrimitive, even though much of it wasn't useful for PrimitiveData.

(edit) @19077   6 months taylor.smock

Fix #23666: commons-io dependency not included in ivy.xml

This removes all imports of org.apache.commons.io classes and replaces them with
similar functionality.

(edit) @19076   6 months stoecker

fix #23673 - i18n conflict

(edit) @19075   7 months taylor.smock

Fix #23628: Decrease cost of ImageWarp#warp

This decreases overall memory allocations for ImageWarp#warp by ~80% and
decreases GC by ~80%.

This does not decrease the direct CPU cost of ImageWarp#warp.

(edit) @19074   7 months stoecker

fix deprecation warnings

(edit) @19073   7 months stoecker

see #17858 - Java 8 → 11

(edit) @19072   7 months taylor.smock

Fix macOS output names for GitHub Actions

(edit) @19071   7 months stoecker

fix pmd

(edit) @19070   7 months stoecker

see #23627 - use getOSMLocaleCodes also for naming primitives

(edit) @19069   7 months stoecker

fix mime type

(edit) @19068   7 months GerdP

fix #23652 Wrong warning for elevator

  • don't check different layers when the node is tagged with highway=elevator
(edit) @19067   7 months taylor.smock

i18n updates

(edit) @19066   7 months GerdP

fix #23641: When mapping a forest inside a forest and make that inner, the inner landuse=forest tag is removed.

  • change code so the tags of inner ways which are common to the multipolygon are not removed.
  • add unit test
(edit) @19065   7 months GerdP

see #21881 Add a check for loops in directional waterways
Fix code in WaySegment and IWaySegment

  • change text in Exception to "Node pair is not a single segment of the way!" and move it to constant IWaySegment.NOT_A_SEGMENT
  • fix error in WaySegment.forNodePair and IWaySegment.forNodePair
  • add unit test for further invalid node pairs
(edit) @19064   7 months GerdP

see #21881 Add a check for loops in directional waterways

  • fix @since xxx
  • adapt unit test
(edit) @19063   7 months GerdP

see #21881: revert unintended change for different ticket

(edit) @19062   7 months GerdP

fix #21881: Add a check for loops in directional waterways
Patch by gaben, slightly modified

  • implements Tarjan algorithm to find strongly connected components
  • new preference validator.CycleDetector.directionalWaterways contains the list of waterway values which should be checked
(edit) @19061   7 months taylor.smock

Fix #23643: Move to supported actions for GitHub ant workflow to remove node16 deprecation warnings

(edit) @19060   7 months stoecker

fix pmd

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