#502 Replaced usages of System.out with logger.
This commit is contained in:
@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.nullobject;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Implementation for binary tree's normal nodes.
|
||||
@ -29,6 +32,8 @@ package com.iluwatar.nullobject;
|
||||
*/
|
||||
public class NodeImpl implements Node {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NodeImpl.class);
|
||||
|
||||
private final String name;
|
||||
private final Node left;
|
||||
private final Node right;
|
||||
@ -64,7 +69,7 @@ public class NodeImpl implements Node {
|
||||
|
||||
@Override
|
||||
public void walk() {
|
||||
System.out.println(name);
|
||||
LOGGER.info(name);
|
||||
if (left.getTreeSize() > 0) {
|
||||
left.walk();
|
||||
}
|
||||
|
Reference in New Issue
Block a user