Changes between Initial Version and Version 1 of Ticket #14923, comment 8


Ignore:
Timestamp:
2017-06-11T12:33:05+02:00 (5 months ago)
Author:
michael2402
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14923, comment 8

    initial v1  
    99@bafonins: You patch looks better that way ;-). Cann you add test cases to it to the `SearchCompilerTest`? Especially for:
    1010
    11 ```
     11{{{
    1212preset:"water"      (Test if it matches correctly)
    1313preset:water        (Test if it matches correctly)
     
    1515preset:             (Should throw a ParseError)
    1616preset:xyz          (Should throw a ParseError)
    17 ```
     17}}}
     18
     19And fix this exception while typing in a preset search:
     20
     21{{{
     22Build-Date:2017-06-11 12:26:22
     23Revision:12354
     24Is-Local-Build:true
     25
     26Identification: JOSM/1.5 (12354 SVN en) Linux Ubuntu 14.04.5 LTS
     27Memory Usage: 615 MB / 3559 MB (423 MB allocated, but free)
     28Java version: 1.8.0_111-8u111-b14-3~14.04.1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
     29Screen: :0.0 1920x1080, :0.1 1920x1080
     30Maximum Screen Size: 1920x1080
     31Java package: openjdk-8-jre:amd64-8u111-b14-3~14.04.1
     32Java ATK Wrapper package: libatk-wrapper-java:all-0.30.4-4
     33VM arguments: [-Dfile.encoding=UTF-8]
     34Dataset consistency test: No problems found
     35
     36Last errors/warnings:
     37- W: java.util.zip.ZipException: error in opening zip file
     38- W: PluginException: : org.openstreetmap.josm.plugins.PluginException: Invalid jar file '<josm.pref>/plugins/ebdirigo.jar.new'
     39- W: Failed to scan file 'ebdirigo.jar.new' for plugin information. Skipping.
     40- W: Failed to install plugin '<josm.pref>/plugins/ebdirigo.jar' from temporary download file '<josm.pref>/plugins/ebdirigo.jar.new'. error in opening zip file: java.util.zip.ZipException: error in opening zip file
     41- W: No configuration settings found.  Using hardcoded default values for all pools.
     42- E: Handled by bug report queue: java.lang.NullPointerException
     43
     44
     45=== REPORTED CRASH DATA ===
     46BugReportExceptionHandler#handleException:
     47No data collected.
     48
     49Warning issued by: BugReportExceptionHandler#handleException
     50
     51=== STACK TRACE ===
     52Thread: AWT-EventQueue-0 (18) of main
     53java.lang.NullPointerException
     54        at java.util.Objects.requireNonNull(Objects.java:203)
     55        at org.openstreetmap.josm.actions.search.SearchCompiler$Preset.<init>(SearchCompiler.java:1571)
     56        at org.openstreetmap.josm.actions.search.SearchCompiler$CoreSimpleMatchFactory.get(SearchCompiler.java:159)
     57        at org.openstreetmap.josm.actions.search.SearchCompiler.parseFactor(SearchCompiler.java:1775)
     58        at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpressionStep1(SearchCompiler.java:1697)
     59        at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1685)
     60        at org.openstreetmap.josm.actions.search.SearchCompiler.parse(SearchCompiler.java:1670)
     61        at org.openstreetmap.josm.actions.search.SearchCompiler.compile(SearchCompiler.java:1641)
     62        at org.openstreetmap.josm.actions.search.SearchAction$1.isValid(SearchAction.java:343)
     63        at org.openstreetmap.josm.actions.search.SearchAction$1.validate(SearchAction.java:328)
     64        at org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator.insertUpdate(AbstractTextComponentValidator.java:166)
     65        at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
     66        at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
     67        at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
     68        at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
     69        at org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox$AutoCompletingComboBoxDocument.insertString(AutoCompletingComboBox.java:109)
     70        at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
     71        at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1328)
     72        at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:884)
     73        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
     74        at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
     75        at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
     76        at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
     77        at java.awt.Component.processEvent(Component.java:6310)
     78        at java.awt.Container.processEvent(Container.java:2236)
     79        at java.awt.Component.dispatchEventImpl(Component.java:4889)
     80        at java.awt.Container.dispatchEventImpl(Container.java:2294)
     81        at java.awt.Component.dispatchEvent(Component.java:4711)
     82        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
     83        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
     84        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
     85        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
     86        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
     87        at java.awt.Component.dispatchEventImpl(Component.java:4760)
     88        at java.awt.Container.dispatchEventImpl(Container.java:2294)
     89        at java.awt.Window.dispatchEventImpl(Window.java:2746)
     90        at java.awt.Component.dispatchEvent(Component.java:4711)
     91        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
     92        at java.awt.EventQueue.access$500(EventQueue.java:97)
     93        at java.awt.EventQueue$3.run(EventQueue.java:709)
     94        at java.awt.EventQueue$3.run(EventQueue.java:703)
     95        at java.security.AccessController.doPrivileged(Native Method)
     96        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
     97        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
     98        at java.awt.EventQueue$4.run(EventQueue.java:731)
     99        at java.awt.EventQueue$4.run(EventQueue.java:729)
     100        at java.security.AccessController.doPrivileged(Native Method)
     101        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
     102        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
     103        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
     104        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
     105        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
     106        at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
     107        at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
     108        at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
     109        at java.security.AccessController.doPrivileged(Native Method)
     110        at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
     111        at java.awt.Dialog.show(Dialog.java:1084)
     112        at java.awt.Component.show(Component.java:1671)
     113        at java.awt.Component.setVisible(Component.java:1623)
     114        at java.awt.Window.setVisible(Window.java:1014)
     115        at java.awt.Dialog.setVisible(Dialog.java:1005)
     116        at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:456)
     117        at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:253)
     118        at org.openstreetmap.josm.actions.search.SearchAction.showSearchDialog(SearchAction.java:390)
     119        at org.openstreetmap.josm.actions.search.SearchAction.search(SearchAction.java:517)
     120        at org.openstreetmap.josm.actions.search.SearchAction.actionPerformed(SearchAction.java:191)
     121        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
     122        at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
     123        at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
     124        at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:263)
     125        at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2974)
     126        at javax.swing.JComponent.processKeyBindings(JComponent.java:2966)
     127        at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
     128        at java.awt.Component.processEvent(Component.java:6310)
     129        at java.awt.Container.processEvent(Container.java:2236)
     130        at java.awt.Component.dispatchEventImpl(Component.java:4889)
     131        at java.awt.Container.dispatchEventImpl(Container.java:2294)
     132        at java.awt.Component.dispatchEvent(Component.java:4711)
     133        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
     134        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
     135        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
     136        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
     137        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
     138        at java.awt.Component.dispatchEventImpl(Component.java:4760)
     139        at java.awt.Container.dispatchEventImpl(Container.java:2294)
     140        at java.awt.Window.dispatchEventImpl(Window.java:2746)
     141        at java.awt.Component.dispatchEvent(Component.java:4711)
     142        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
     143        at java.awt.EventQueue.access$500(EventQueue.java:97)
     144        at java.awt.EventQueue$3.run(EventQueue.java:709)
     145        at java.awt.EventQueue$3.run(EventQueue.java:703)
     146        at java.security.AccessController.doPrivileged(Native Method)
     147        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
     148        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
     149        at java.awt.EventQueue$4.run(EventQueue.java:731)
     150        at java.awt.EventQueue$4.run(EventQueue.java:729)
     151        at java.security.AccessController.doPrivileged(Native Method)
     152        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
     153        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
     154        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
     155        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
     156        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
     157        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
     158        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
     159        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
     160}}}