nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fc94dd
)
counter: fix NPE on nullable element to_s
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 27 Feb 2017 19:37:25 +0000
(14:37 -0500)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 27 Feb 2017 19:37:25 +0000
(14:37 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/counter.nit
patch
|
blob
|
history
diff --git
a/lib/counter.nit
b/lib/counter.nit
index
ceecb48
..
ceb9896
100644
(file)
--- a/
lib/counter.nit
+++ b/
lib/counter.nit
@@
-133,6
+133,7
@@
class Counter[E]
# @toimplement by default just call `to_s` on the element
protected fun element_to_s(e: E): String
do
+ if e == null then return "null"
return e.to_s
end