Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11397 closed defect (fixed)

[PATCH] NullPointerException when item is retrieved from the TMS cache

Reported by: wiktorn Owned by: Don-vip
Priority: major Milestone: 15.05
Component: Core imagery Version:
Keywords: regression Cc:

Description

In [8303] there was introduced transient keyword to HashMap in:
http://josm.openstreetmap.de/changeset/8308/josm/trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java

This makes, that every time when tile is fetched from Cache, HashMap will be empty, so getLongAttr will throw NullPointerException.

This must be non-transient field. Better approach is to change the type from Map to HashMap, so the code will be guaranteed to be serializable.

Attachments (1)

11397_NPE.patch (1.1 KB) - added by wiktorn 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by wiktorn

Attachment: 11397_NPE.patch added

comment:1 Changed 9 years ago by wiktorn

Summary: NullPointerException when item is retrieved from the TMS cache[PATCH] NullPointerException when item is retrieved from the TMS cache

comment:2 Changed 9 years ago by Don-vip

Keywords: regression added
Status: newassigned

comment:3 Changed 9 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 8313/josm:

fix #11397 - NPE

comment:4 Changed 9 years ago by wiktorn

Don,

Why you decided to leave Map interface instead of HashMap as CacheEntryAttributes.attrs type specification?

comment:5 Changed 9 years ago by Don-vip

Because it would trigger another sonar warning :-) I think I will disable the one about serialization.

comment:6 Changed 9 years ago by Don-vip

Ticket #11399 has been marked as a duplicate of this ticket.

comment:7 Changed 9 years ago by wiktorn

Ticket #11407 has been marked as a duplicate of this ticket.

comment:8 Changed 9 years ago by skyper

Ticket #11416 has been marked as a duplicate of this ticket.

comment:9 Changed 9 years ago by Don-vip

In 8399/josm:

see #11397, see #11447 - partial revert of r8308 (SONARJAVA-1061: FP on S1948: no issue should be raised when using Collections of Serializable objects)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.