#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)
Change History (10)
by , 11 years ago
| Attachment: | 11397_NPE.patch added |
|---|
comment:1 by , 11 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 , 11 years ago
| Keywords: | regression added |
|---|---|
| Status: | new → assigned |
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 11 years ago
Don,
Why you decided to leave Map interface instead of HashMap as CacheEntryAttributes.attrs type specification?
comment:5 by , 11 years ago
Because it would trigger another sonar warning :-) I think I will disable the one about serialization.



In 8313/josm: