Skip to content

Commit 662c8fe

Browse files
vxelstephengold
authored andcommitted
fix issue 1672 (inefficient logging in Node.java) (#1673)
* #1672 Logging statements should be guarded * #1672 Fix performance penalty of logger without guard Co-authored-by: Cédric de Launois <>
1 parent b0018f4 commit 662c8fe

File tree

1 file changed

+2
-2
lines changed
  • jme3-core/src/main/java/com/jme3/scene

1 file changed

+2
-2
lines changed

jme3-core/src/main/java/com/jme3/scene/Node.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public Spatial detachChildAt(int index) {
431431
Spatial child = children.remove(index);
432432
if (child != null) {
433433
child.setParent(null);
434-
logger.log(Level.FINE, "{0}: Child removed.", this.toString());
434+
logger.log(Level.FINE, "{0}: Child removed.", this);
435435

436436
// since a child with a bound was detached;
437437
// our own bound will probably change.
@@ -461,7 +461,7 @@ public void detachAllChildren() {
461461
for (int i = children.size() - 1; i >= 0; i--) {
462462
detachChildAt(i);
463463
}
464-
logger.log(Level.FINE, "{0}: All children removed.", this.toString());
464+
logger.log(Level.FINE, "{0}: All children removed.", this);
465465
}
466466

467467
/**

0 commit comments

Comments
 (0)