Modify

Opened 6 years ago

Closed 5 years ago

#16921 closed defect (fixed)

Calling SyncEditorLayerIndex.groovy creates unneeded preferences file and then throws NPE doing so

Reported by: stoecker Owned by: team
Priority: minor Milestone: 19.10
Component: Core Version:
Keywords: Cc:

Description (last modified by Don-vip)

2018-10-30 18:43:15.956 INFO: Missing preference file '/root/.config/JOSM/preferences.xml'. Creating a default preference file.
Caught: java.lang.NullPointerException java.lang.NullPointerException
         at org.openstreetmap.josm.data.preferences.PreferencesWriter.write(PreferencesWriter.java:59)
         at org.openstreetmap.josm.data.Preferences.save(Preferences.java:359)
         at org.openstreetmap.josm.data.Preferences.save(Preferences.java:333)
         at org.openstreetmap.josm.data.Preferences.putSetting(Preferences.java:598)
         at org.openstreetmap.josm.spi.preferences.AbstractPreferences.put(AbstractPreferences.java:25)
         at org.openstreetmap.josm.spi.preferences.AbstractPreferences.putInt(AbstractPreferences.java:55)
         at org.openstreetmap.josm.data.Preferences.save(Preferences.java:347)
         at org.openstreetmap.josm.data.Preferences.save(Preferences.java:333)
         at org.openstreetmap.josm.data.Preferences.init(Preferences.java:487)
         at org.openstreetmap.josm.data.Preferences$init.call(Unknown Source)
         at SyncEditorLayerIndex.main(SyncEditorLayerIndex.groovy:64)
         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Attachments (0)

Change History (8)

comment:1 by Don-vip, 6 years ago

Description: modified (diff)
Summary: Calling SyncEditorLayerIndex.groovy creates uneeded preferences file and ven crash doing soCalling SyncEditorLayerIndex.groovy creates unneeded preferences file and then throws NPE doing so

comment:2 by Don-vip, 6 years ago

I added the preferences setup code in r13767 as the code relied on having initialized preferences. Maybe there's a better way to fix this (it was the quickest solution at that time)

comment:3 by Klumbumbus, 6 years ago

Is that the reason for - W: No configuration settings found. Using hardcoded default values for all pools. in nearly every status report?

comment:4 by Don-vip, 6 years ago

No, this ticket is about the ELI synchronization script only.

comment:5 by Don-vip, 6 years ago

Milestone: 18.1118.12

comment:6 by Don-vip, 6 years ago

Milestone: 18.12

comment:7 by Don-vip, 5 years ago

Milestone: 19.10
Priority: normalminor

comment:8 by Don-vip, 5 years ago

Resolution: fixed
Status: newclosed

In 15478/josm:

fix #16921 - fix NPE when running ELI sync script without prior preferences file

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.