Commit d4dfed17 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

toString could return NPE

parent 0b36888f
......@@ -78,7 +78,9 @@ public class Pair<L, R> implements Serializable {
@Override
public String toString() {
return "Pair: " + getLeft().toString() + ", " + getRight().toString();
String left = getLeft() == null ? "null" : getLeft().toString();
String right = getRight() == null ? "null" : getRight().toString();
return "Pair: " + left + ", " + right;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment