From 0e3ec4663c5e5a57d7a83ba7bbb2a8a27db17c39 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Fri, 10 Jan 2025 17:16:24 +0300 Subject: [PATCH] bug(#3790): put --- eo-runtime/src/main/java/org/eolang/PhDefault.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/PhDefault.java b/eo-runtime/src/main/java/org/eolang/PhDefault.java index d8ae1d4be9..b8d97facd3 100644 --- a/eo-runtime/src/main/java/org/eolang/PhDefault.java +++ b/eo-runtime/src/main/java/org/eolang/PhDefault.java @@ -98,7 +98,7 @@ public PhDefault() { */ public PhDefault(final byte[] dta) { this.data = Optional.ofNullable(dta); - this.attrs = Map.of(Attr.RHO, new AtRho()); + this.attrs = PhDefault.defaults(); this.order = new HashMap<>(0); } @@ -302,6 +302,16 @@ private String oname() { return txt; } + /** + * Default attributes hash map with RHO attribute put. + * @return Default attributes hash map + */ + private static Map defaults() { + final Map attrs = new HashMap<>(0); + attrs.put(Attr.RHO, new AtRho()); + return attrs; + } + /** * Log debug message for PhDefault. * @param msg Message to log