Modify

Opened 6 months ago

Last modified 4 months ago

#16921 new defect

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

Reported by: stoecker Owned by: team
Priority: normal Milestone:
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 (6)

comment:1 Changed 6 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 6 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 6 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 6 months ago by Don-vip

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

comment:5 Changed 5 months ago by Don-vip

Milestone: 18.1118.12

comment:6 Changed 4 months ago by Don-vip

Milestone: 18.12

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to stoecker
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.