Modify

Opened 19 months ago

Closed 7 months 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 Changed 19 months ago by Don-vip

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 Changed 19 months ago by Don-vip

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 Changed 19 months ago by Klumbumbus

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

comment:4 Changed 19 months ago by Don-vip

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

comment:5 Changed 19 months ago by Don-vip

Milestone: 18.1118.12

comment:6 Changed 17 months ago by Don-vip

Milestone: 18.12

comment:7 Changed 7 months ago by Don-vip

Milestone: 19.10
Priority: normalminor

comment:8 Changed 7 months ago by Don-vip

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.