Skip to content

Commit c1e8e96

Browse files
committed
Fix #28 by using TopScope instead of null
1 parent 3edc6b2 commit c1e8e96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/scala/xml/PrettyPrinter.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ class PrettyPrinter(width: Int, step: Int) {
244244
* @param pscope the namespace to prefix mapping
245245
* @return the formatted string
246246
*/
247-
def format(n: Node, pscope: NamespaceBinding = null): String =
248-
sbToString(format(n, pscope, _))
247+
def format(n: Node, pscope: NamespaceBinding = TopScope): String = {
248+
sbToString(format(n, pscope, _)) }
249249

250250
/**
251251
* Returns a formatted string containing well-formed XML.

0 commit comments

Comments
 (0)