﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24863	UnsupportedOperationException in AutoFilterManager.updateButtons on every upload when an auto filter button is active	anonymous	team	"==== What steps will reproduce the problem?

1. Enable auto filters (default: auto.filter.enabled=true, auto.filter.rule=level).
2. Zoom in far enough that the level auto filter buttons appear, and click one so it is pressed.
3. Make any edit and upload.

Requires async upload, which is the default (message.upload.asynchronous / IS_ASYNC_UPLOAD_ENABLED, default true). The synchronous UploadPrimitivesTask path does not trigger it.

==== What is the expected result?

Upload completes without a bug report; the auto filter buttons stay visible.

==== What happens instead?

Bug report dialog:

  java.lang.UnsupportedOperationException
      at java.base/java.util.Collections$UnmodifiableCollection.add(Collections.java:1092)
      at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.updateButtons(AutoFilterManager.java:149)
      at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.dataChanged(AutoFilterManager.java:353)
      at org.openstreetmap.josm.data.osm.event.DataChangedEvent.fire(DataChangedEvent.java:38)
      at org.openstreetmap.josm.data.osm.event.DatasetEventManager.fireConsolidatedEvents(DatasetEventManager.java:210)
      at org.openstreetmap.josm.data.osm.event.DatasetEventManager$EdtRunnable.run(DatasetEventManager.java:90)
      ...
      at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doBeginTask$3(PleaseWaitProgressMonitor.java:255)

  The upload itself still succeeds, but because DatasetEventManager.fireConsolidatedEvents() (line 206‑213) has no try/catch, the throw skips every remaining IN_EDT_CONSOLIDATED
  DataSetListener for that event.

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2026-08-11 15:36:21 +0200 (Tue, 11 Aug 2026)
Revision:19613
Build-Date:2026-08-12 01:30:51
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19613 en) Linux Ubuntu 24.04.4 LTS
Memory Usage: 448 MB / 23744 MB (139 MB allocated, but free)
Java version: 21.0.11+10-1-24.04.2-Ubuntu, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920x1080x[Multi depth]@60Hz (scaling 1.00×1.00) :0.1 1920x1080x[Multi depth]@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: ubuntu:GNOME
Java package: openjdk-21-jre:amd64-21.0.11+10-1~24.04.2
Java ATK Wrapper package: libatk-wrapper-java:all-0.40.0-3build2
libcommons-compress-java: libcommons-compress-java:all-1.25.0-1
libcommons-logging-java: libcommons-logging-java:all-1.3.0-1ubuntu1
fonts-noto: fonts-noto:all-20201225-2
VM arguments: [--module-path=/usr/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djava.net.useSystemProxies=true, -XX:MaxRAMPercentage=75.0, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]
Dataset consistency test: No problems found

Plugins:
+ PicLayer (275)
+ pdfimport (36503)
+ reverter (36503)
+ utilsplugin2 (36503)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1

Last errors/warnings:
- 05488.791 E: Handled by bug report queue: java.lang.UnsupportedOperationException

=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (33) of main
java.lang.UnsupportedOperationException
	at java.base/java.util.Collections$UnmodifiableCollection.add(Collections.java:1092)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.updateButtons(AutoFilterManager.java:149)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.dataChanged(AutoFilterManager.java:353)
	at org.openstreetmap.josm.data.osm.event.DataChangedEvent.fire(DataChangedEvent.java:38)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.fireConsolidatedEvents(DatasetEventManager.java:210)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager$EdtRunnable.run(DatasetEventManager.java:90)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1079)
	at java.desktop/java.awt.Component.show(Component.java:1728)
	at java.desktop/java.awt.Component.setVisible(Component.java:1675)
	at java.desktop/java.awt.Window.setVisible(Window.java:1036)
	at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1015)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doBeginTask$3(PleaseWaitProgressMonitor.java:255)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doInEDT$0(PleaseWaitProgressMonitor.java:113)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
}}}
"	defect	new	normal		Core			template_report	
