From: Alexandre Terrasa Date: Wed, 20 Apr 2016 06:32:39 +0000 (-0400) Subject: lib: fix more call on nullable receiver warnings X-Git-Url: http://nitlanguage.org lib: fix more call on nullable receiver warnings Signed-off-by: Alexandre Terrasa --- diff --git a/lib/github/github_curl.nit b/lib/github/github_curl.nit index a15d439..b5874f3 100644 --- a/lib/github/github_curl.nit +++ b/lib/github/github_curl.nit @@ -84,7 +84,7 @@ class GithubCurl if obj isa JsonObject then if obj.keys.has("message") then var title = "GithubAPIError" - var msg = obj["message"].to_s + var msg = obj["message"].as(not null).to_s var err = new GithubError(msg, title) err.json["requested_uri"] = uri err.json["status_code"] = response.status_code diff --git a/lib/html/bootstrap.nit b/lib/html/bootstrap.nit index d7960e3..7b5084f 100644 --- a/lib/html/bootstrap.nit +++ b/lib/html/bootstrap.nit @@ -76,6 +76,7 @@ class Link redef fun rendering do add "{text}" end @@ -117,6 +118,7 @@ class Header redef fun rendering do add "{text.write_to_string}" + var subtext = self.subtext if subtext != null then add "{subtext.write_to_string}" add "" end @@ -446,6 +448,7 @@ class BSPanel redef fun rendering do addn "" + var heading = self.heading if heading != null then addn "
" addn heading.write_to_string @@ -454,6 +457,7 @@ class BSPanel addn "
" addn body.write_to_string addn "
" + var footer = self.footer if footer != null then addn "
" addn footer.write_to_string diff --git a/lib/neo4j/graph/json_graph_store.nit b/lib/neo4j/graph/json_graph_store.nit index 8ac55cc..618a1d3 100644 --- a/lib/neo4j/graph/json_graph_store.nit +++ b/lib/neo4j/graph/json_graph_store.nit @@ -309,7 +309,7 @@ redef class NeoEdge # Use the IDs specfied by `graph.nodes`. redef fun append_json_for(graph, buffer) do buffer.append "\{\"type\":" - rel_type.append_json(buffer) + rel_type.as(not null).append_json(buffer) buffer.append ",\"properties\":" properties.append_json(buffer) buffer.append ",\"from\":"