﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17517	[Patch] Changeset ID is not always pasted in ChangesetCacheManager dialog	GerdP	team	"==== What steps will reproduce the problem?
1. Start JOSM
2. Have a changeset ID (11111) in clipboard and press Alt+Ctrl+C to open the `ChangesetCacheManager`
3. See that the ID is automatically pasted into the ChangesetID field.
4. Close the dialog
5. Copy a different id (22222) into the clipboard.
6. Press Alt+Ctrl+C again and see that the old id (11111) is still in the field.
7. While the dialog is still open copy a new id (33333) into the clipboard
8. Close the dialog.
9. Copy again another id (44444) into clipboard
10. Press Alt+Ctrl+C again and see that now the id (33333) is in the field.
11. Close the dialog and open it again. Now 44444 is in the field.

==== What is the expected result?
The current clipboard content should be in the field
==== What happens instead?
Sometimes the field is filled with older content
==== Please provide any additional information below. Attach a screenshot if possible.
Problem is caused by calls to `ChangesetCacheManager.getInstance()` which creates the dialog if it doesn't exist and pastes the content of the clipboard. The method is also called when the dialog was just closed
and thus it is created with the wrong clipboard content. This is also a memory leak.
{{{
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-03-03 00:16:03 +0100 (Sun, 03 Mar 2019)
Build-Date:2019-03-02 23:16:53
Revision:14824
Relative:URL: ^/trunk

Identification: JOSM/1.5 (14824 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 605 MB / 1820 MB (395 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20190325_113131.jfr]

Plugins:
+ OpeningHoursEditor (34867)
+ apache-commons (34506)
+ buildings_tools (34904)
+ continuosDownload (82)
+ download_along (34869)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34678)
+ jts (34524)
+ o5m (34867)
+ opendata (34911)
+ pbf (34867)
+ poly (34867)
+ reltoolbox (34867)
+ reverter (34944)
+ undelete (34919)
+ utilsplugin2 (34932)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
}}}
"	defect	closed	normal	19.04	Core		fixed	template_report	
