Changeset 4616 in josm for trunk/src/org


Ignore:
Timestamp:
2011-11-27T23:10:38+01:00 (9 years ago)
Author:
bastiK
Message:

see #7088 - avoid NPE

Location:
trunk/src/org/openstreetmap/josm/gui/preferences
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java

    r3906 r4616  
    255255        @Override
    256256        public Collection<String> serialize(SourceEntry entry) {
    257             return Arrays.asList(new String[] {entry.url, entry.name, entry.title, Boolean.toString(entry.active)});
     257            return Arrays.asList(new String[] {
     258                    entry.url,
     259                    entry.name == null ? "" : entry.name,
     260                    entry.title == null ? "" : entry.title,
     261                    Boolean.toString(entry.active)
     262            });
    258263        }
    259264
  • trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java

    r3894 r4616  
    336336        @Override
    337337        public Collection<String> serialize(SourceEntry entry) {
    338             return Arrays.asList(new String[] {entry.url, entry.title});
     338            return Arrays.asList(new String[] {entry.url, entry.title == null ? "" : entry.title});
    339339        }
    340340
Note: See TracChangeset for help on using the changeset viewer.