]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/com/infomatiq/jsi/PriorityQueue.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / com / infomatiq / jsi / PriorityQueue.java
index 3b402a86a3ee3f90e11f2bd606c0598dc9f5da11..150726681d476302270ca115f929c58fd2b5baaf 100644 (file)
 package com.infomatiq.jsi;
 
 import gnu.trove.TIntArrayList;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import gnu.trove.TFloatArrayList;
 
 /**
@@ -69,6 +73,7 @@ import gnu.trove.TFloatArrayList;
  * @version 1.0b8
  */
 public class PriorityQueue {
+  private static final Logger LOGGER = LoggerFactory.getLogger(PriorityQueue.class);
   public static final boolean SORT_ORDER_ASCENDING = true;
   public static final boolean SORT_ORDER_DESCENDING = false;
 
@@ -238,7 +243,7 @@ public class PriorityQueue {
       if (leftIndex <= lastIndex) {
         float leftPriority = priorities.get(leftIndex);
         if (sortsEarlierThan(leftPriority, currentPriority)) {
-          System.err.println("Internal error in PriorityQueue");
+          LOGGER.error("Internal error in PriorityQueue");
         }
       }
 
@@ -246,7 +251,7 @@ public class PriorityQueue {
       if (rightIndex <= lastIndex) {
         float rightPriority = priorities.get(rightIndex);
         if (sortsEarlierThan(rightPriority, currentPriority)) {
-          System.err.println("Internal error in PriorityQueue");
+          LOGGER.error("Internal error in PriorityQueue");
         }
       }
     }