Fixed a crash with Map.put

This commit is contained in:
Speiger 2021-06-24 20:58:17 +02:00
parent dff5e534ff
commit 8618c10d01
3 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,9 @@
# Changelog of versions # Changelog of versions
### Version 0.3.2
- Fixed: Map.put wasn't referring to primitive variants.
### Version 0.3.1 ### Version 0.3.1
- Fixed: containsKey & containsValue in HashMaps were deprecated for Object Variants. - Fixed: containsKey & containsValue in HashMaps were deprecated for Object Variants.
- Fixed: HashMap wasn't deleting Keys & Values references when removing a Object - Fixed: HashMap wasn't deleting Keys & Values references when removing a Object

View File

@ -18,7 +18,7 @@ repositories {
} }
archivesBaseName = 'Primitive Collections' archivesBaseName = 'Primitive Collections'
version = '0.3.1'; version = '0.3.2-SNAPSHOT';
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

View File

@ -46,6 +46,14 @@ public abstract class ABSTRACT_MAP KEY_VALUE_GENERIC_TYPE extends AbstractMap<CL
return this; return this;
} }
#if !TYPE_OBJECT || !VALUE_OBJECT
@Override
@Deprecated
public CLASS_VALUE_TYPE put(CLASS_TYPE key, CLASS_VALUE_TYPE value) {
return VALUE_TO_OBJ(put(OBJ_TO_KEY(key), OBJ_TO_VALUE(value)));
}
#endif
#if VALUE_PRIMITIVES #if VALUE_PRIMITIVES
@Override @Override
public void addToAll(MAP KEY_VALUE_GENERIC_TYPE m) { public void addToAll(MAP KEY_VALUE_GENERIC_TYPE m) {