From c1e8e964adae29a2f8e0627a53781c3d9616fade Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Wed, 3 Dec 2014 14:00:49 -0500 Subject: [PATCH] Fix #28 by using TopScope instead of null --- src/main/scala/scala/xml/PrettyPrinter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/scala/xml/PrettyPrinter.scala b/src/main/scala/scala/xml/PrettyPrinter.scala index 515c9c088..6fd6c7341 100755 --- a/src/main/scala/scala/xml/PrettyPrinter.scala +++ b/src/main/scala/scala/xml/PrettyPrinter.scala @@ -244,8 +244,8 @@ class PrettyPrinter(width: Int, step: Int) { * @param pscope the namespace to prefix mapping * @return the formatted string */ - def format(n: Node, pscope: NamespaceBinding = null): String = - sbToString(format(n, pscope, _)) + def format(n: Node, pscope: NamespaceBinding = TopScope): String = { + sbToString(format(n, pscope, _)) } /** * Returns a formatted string containing well-formed XML.