﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
21550	[PATCH] NPE in org.openstreetmap.josm.gui.tagging.presets.items.PresetListEntry.getCount	S-ThndR	team	"==== What steps will reproduce the problem?
1. Add tagging preset ""Parking lanes"".
2. In presets drop down menu, click any of the presets that comes with Parking lanes. Type of the selected object seems not matter. 

==== What is the expected result?
""Change object"" window pop-up. 

==== What happens instead?
A exception.

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-11-01 23:05:46 +0100 (Mon, 01 Nov 2021)
Build-Date:2021-11-01 22:25:18
Revision:18303
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18303 zh_CN) Windows 7 64-Bit
OS Build number: Windows 7 Ultimate (7601)
Memory Usage: 951 MB / 1820 MB (548 MB allocated, but free)
Java version: 1.8.0_301-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560×1440 (scaling 1.00×1.00)
Maximum Screen Size: 2560×1440
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: GBK
System property sun.jnu.encoding: GBK
Locale info: zh_CN
Numbers with default locale: 1234567890 -> 1234567890
Dataset consistency test: No problems found

Plugins:
+ ImproveWay (32)
+ alignways (35753)
+ buildings_tools (35823)
+ editgpx (35562)
+ gpsblam (35458)
+ gridify (1606242219)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ reverter (35846)
+ terracer (35827)
+ utilsplugin2 (35856)

Tagging presets:
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/TurnLanes&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1

Last errors/warnings:
- 00001.625 W: java.util.zip.ZipException: error in opening zip file
- 00001.626 W: PluginException: : org.openstreetmap.josm.plugins.PluginException: 无效的 jar 文件“<josm.pref>\plugins\wikipedia.jar.new”
- 00001.626 W: 文件""wikipedia.jar.new""扫描插件信息失败，正在跳过。
- 00001.998 W: java.util.zip.ZipException: error in opening zip file
- 00001.998 W: PluginException: : org.openstreetmap.josm.plugins.PluginException: 无效的 jar 文件“<josm.pref>\plugins\wikipedia.jar.new”
- 00001.998 W: 文件""wikipedia.jar.new""扫描插件信息失败，正在跳过。
- 00002.144 W: 无法从临时下载文件“<josm.pref>\plugins\wikipedia.jar.new”中安装插件“<josm.pref>\plugins\wikipedia.jar”。error in opening zip file: java.util.zip.ZipException: error in opening zip file
- 00018.187 E: Handled by bug report queue: java.lang.NullPointerException
- 01597.488 E: Handled by bug report queue: java.lang.NullPointerException



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (19) of main
java.lang.NullPointerException
	at org.openstreetmap.josm.gui.tagging.presets.items.PresetListEntry.getCount(PresetListEntry.java:191)
	at org.openstreetmap.josm.gui.tagging.presets.items.PresetListEntry.getListDisplay(PresetListEntry.java:85)
	at org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect$ComboMultiSelectListCellRenderer.getListCellRendererComponent(ComboMultiSelect.java:139)
	at org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect$ComboMultiSelectListCellRenderer.getListCellRendererComponent(ComboMultiSelect.java:104)
	at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
	at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
	at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
	at javax.swing.JList.setSelectedIndex(Unknown Source)
	at javax.swing.plaf.basic.BasicComboPopup.setListSelection(Unknown Source)
	at javax.swing.plaf.basic.BasicComboPopup.access$300(Unknown Source)
	at javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(Unknown Source)
	at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
	at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
	at javax.swing.JComboBox.contentsChanged(Unknown Source)
	at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
	at org.openstreetmap.josm.gui.widgets.JosmComboBoxModel.setSelectedItem(JosmComboBoxModel.java:149)
	at javax.swing.JComboBox.setSelectedItem(Unknown Source)
	at org.openstreetmap.josm.gui.tagging.presets.items.Combo.addToPanel(Combo.java:159)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.createPanel(TaggingPreset.java:435)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.showDialog(TaggingPreset.java:596)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.showAndApply(TaggingPreset.java:508)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.actionPerformed(TaggingPreset.java:498)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
}}}
"	defect	closed	normal	21.12	Core	tested	fixed	template_report, regression	hauke-stieler
