Open jeroenvandijk opened 1 year ago
I found a scenario where I'm getting a Nullpointer exception for a certain configuration.
The following works:
(let [deps0 [{:provides #{:a}} {}]] (loopr [deps {}] [current-dep deps0 k (:provides current-dep)] (recur (assoc deps k current-dep)))) ;=> {:a {:provides #{:a}}}
Adapting the above with one extra accumulator arg2 now throws.
arg2
(let [deps0 [{:provides #{:a}} {}]] (loopr [deps {} arg2 {}] [current-dep deps0 k (:provides current-dep)] (recur (assoc deps k current-dep) arg2))) ;=> throws NullPointerException
Adding a default value [] works around this issue:
[]
(let [deps0 [{:provides #{:a}} {}]] (loopr [deps {} arg2 {}] [current-dep deps0 k (:provides current-dep [])] (recur (assoc deps k current-dep) arg2))) ;=> [{:a {:provides #{:a}}} {}]
I found a scenario where I'm getting a Nullpointer exception for a certain configuration.
The following works:
Adapting the above with one extra accumulator
arg2
now throws.Adding a default value
[]
works around this issue: