Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 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 10 years ago.

Download all attachments as: .zip

Change History (10)

by wiktorn, 10 years ago

Attachment: 11397_NPE.patch added

comment:1 by wiktorn, 10 years ago

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

comment:2 by Don-vip, 10 years ago

Keywords: regression added
Status: newassigned

comment:3 by Don-vip, 10 years ago

Resolution: fixed
Status: assignedclosed

In 8313/josm:

fix #11397 - NPE

comment:4 by wiktorn, 10 years ago

Don,

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

comment:5 by Don-vip, 10 years ago

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

comment:6 by Don-vip, 10 years ago

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

comment:7 by wiktorn, 10 years ago

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

comment:8 by skyper, 10 years ago

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

comment:9 by Don-vip, 10 years ago

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. 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.