]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graphviz/src/org/simantics/graphviz/drawable/GraphDrawable.java
Prevent some NPEs in Graphviz plugin
[simantics/platform.git] / bundles / org.simantics.graphviz / src / org / simantics / graphviz / drawable / GraphDrawable.java
index b1495788f2ecd9f961870eb6bde26b56cffa0a21..d5c80c70db7061f394cb427370db095f9ff1558f 100644 (file)
@@ -22,6 +22,8 @@ import org.simantics.graphviz.continuation.Computation;
 import org.simantics.graphviz.continuation.Continuation;
 import org.simantics.graphviz.internal.xdot.DrawCommand;
 import org.simantics.graphviz.internal.xdot.DrawCommandParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A drawable that draws a given graph.
@@ -29,7 +31,8 @@ import org.simantics.graphviz.internal.xdot.DrawCommandParser;
  * @author Hannu Niemist�
  */
 public class GraphDrawable implements Drawable {
-
+    private static final Logger LOGGER = LoggerFactory.getLogger(GraphDrawable.class);
+    
        private static String DEFAULT_ALGORITHM = "dot";
        
        DrawCommand[] commands;
@@ -113,7 +116,7 @@ public class GraphDrawable implements Drawable {
        @Override
        public synchronized Rectangle2D getBounds() {
            if(bounds == null)
-               System.err.println("bounds == null");
+               LOGGER.warn("bounds == null");
                return bounds;
        }