Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.4.0, 1.5.0
-
None
Description
Trying to get with default value after deserialization fails as the EmptyMap doesn't support put operations for new default values.
The problem is here:
Reproduce:
@Test public void tes() throws IOException, ClassNotFoundException { ParameterTool params = ParameterTool.fromMap(new HashMap<>()); // works params.get("asd", "default"); byte[] b = InstantiationUtil.serializeObject(params); ParameterTool dparams = InstantiationUtil.deserializeObject(b, getClass().getClassLoader()); // fails dparams.get("asd", "default"); }
Attachments
Issue Links
- links to