Description
Code to reproduce:
IgniteCache<Integer, String[]> cache = ignite.getOrCreateCache(CACHE_NAME); cache.put(1, new String[]{"hello", "world"}); String[] res = cache.get(1);
The bug is in CacheObjectContext.unwrapBinariesInArrayIfNeeded method, which always produces a new array.
We should check for basic types somehow and skip this conversion.
Generally, we NEVER want to change the type of the array, so the fix may be:
if (arr.getClass().getComponentType() != Object.class) return arr;
Attachments
Issue Links
- blocks
-
IGNITE-1915 .NET: Ignite as Entity Framework Second-Level Cache
- Resolved
- links to