Depend only on lookup and only during compile time (e.g. provided dependency)
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 05 Nov 2013 12:57:50 +0100
changeset 318ffb71fcf02de
parent 317 6af7542ab0f8
child 319 607903bf2995
Depend only on lookup and only during compile time (e.g. provided dependency)
boot-fx/pom.xml
boot-fx/src/main/java/org/apidesign/html/boot/fx/FXBrwsr.java
ko-fx/pom.xml
ko-fx/src/test/java/org/apidesign/html/kofx/DynamicHTTP.java
     1.1 --- a/boot-fx/pom.xml	Tue Nov 05 12:55:07 2013 +0100
     1.2 +++ b/boot-fx/pom.xml	Tue Nov 05 12:57:50 2013 +0100
     1.3 @@ -41,7 +41,7 @@
     1.4      </dependency>
     1.5      <dependency>
     1.6        <groupId>org.netbeans.api</groupId>
     1.7 -      <artifactId>org-openide-util</artifactId>
     1.8 +      <artifactId>org-openide-util-lookup</artifactId>
     1.9        <scope>provided</scope>
    1.10      </dependency>
    1.11      <dependency>
     2.1 --- a/boot-fx/src/main/java/org/apidesign/html/boot/fx/FXBrwsr.java	Tue Nov 05 12:55:07 2013 +0100
     2.2 +++ b/boot-fx/src/main/java/org/apidesign/html/boot/fx/FXBrwsr.java	Tue Nov 05 12:57:50 2013 +0100
     2.3 @@ -23,6 +23,8 @@
     2.4  import java.net.URL;
     2.5  import java.util.concurrent.CountDownLatch;
     2.6  import java.util.concurrent.Executors;
     2.7 +import java.util.logging.Level;
     2.8 +import java.util.logging.Logger;
     2.9  import javafx.application.Application;
    2.10  import javafx.application.Platform;
    2.11  import javafx.beans.value.ChangeListener;
    2.12 @@ -41,13 +43,13 @@
    2.13  import javafx.scene.web.WebView;
    2.14  import javafx.stage.Modality;
    2.15  import javafx.stage.Stage;
    2.16 -import org.openide.util.Exceptions;
    2.17  
    2.18  /** This is an implementation class, use {@link BrowserBuilder} API. Just
    2.19   * include this JAR on classpath and the {@link BrowserBuilder} API will find
    2.20   * this implementation automatically.
    2.21   */
    2.22  public class FXBrwsr extends Application {
    2.23 +    private static final Logger LOG = Logger.getLogger(FXBrwsr.class.getName());
    2.24      private static FXBrwsr INSTANCE;
    2.25      private static final CountDownLatch FINISHED = new CountDownLatch(1);
    2.26      private BorderPane root;
    2.27 @@ -89,7 +91,7 @@
    2.28                      waitForResult.await();
    2.29                      break;
    2.30                  } catch (InterruptedException ex) {
    2.31 -                    Exceptions.printStackTrace(ex);
    2.32 +                    LOG.log(Level.INFO, null, ex);
    2.33                  }
    2.34              }
    2.35              return arr[0];
    2.36 @@ -161,7 +163,7 @@
    2.37                  FINISHED.await();
    2.38                  break;
    2.39              } catch (InterruptedException ex) {
    2.40 -                Exceptions.printStackTrace(ex);
    2.41 +                LOG.log(Level.INFO, null, ex);
    2.42              }
    2.43          }
    2.44      }
     3.1 --- a/ko-fx/pom.xml	Tue Nov 05 12:55:07 2013 +0100
     3.2 +++ b/ko-fx/pom.xml	Tue Nov 05 12:57:50 2013 +0100
     3.3 @@ -62,7 +62,7 @@
     3.4      </dependency>
     3.5      <dependency>
     3.6        <groupId>org.netbeans.api</groupId>
     3.7 -      <artifactId>org-openide-util</artifactId>
     3.8 +      <artifactId>org-openide-util-lookup</artifactId>
     3.9        <scope>provided</scope>
    3.10      </dependency>
    3.11      <dependency>
     4.1 --- a/ko-fx/src/test/java/org/apidesign/html/kofx/DynamicHTTP.java	Tue Nov 05 12:55:07 2013 +0100
     4.2 +++ b/ko-fx/src/test/java/org/apidesign/html/kofx/DynamicHTTP.java	Tue Nov 05 12:57:50 2013 +0100
     4.3 @@ -30,6 +30,8 @@
     4.4  import java.net.URISyntaxException;
     4.5  import java.util.ArrayList;
     4.6  import java.util.List;
     4.7 +import java.util.logging.Level;
     4.8 +import java.util.logging.Logger;
     4.9  import org.glassfish.grizzly.PortRange;
    4.10  import org.glassfish.grizzly.http.server.HttpHandler;
    4.11  import org.glassfish.grizzly.http.server.HttpServer;
    4.12 @@ -41,13 +43,13 @@
    4.13  import org.glassfish.grizzly.websockets.WebSocketAddOn;
    4.14  import org.glassfish.grizzly.websockets.WebSocketApplication;
    4.15  import org.glassfish.grizzly.websockets.WebSocketEngine;
    4.16 -import org.openide.util.Exceptions;
    4.17  
    4.18  /**
    4.19   *
    4.20   * @author Jaroslav Tulach <jtulach@netbeans.org>
    4.21   */
    4.22  final class DynamicHTTP extends HttpHandler {
    4.23 +    private static final Logger LOG = Logger.getLogger(DynamicHTTP.class.getName());
    4.24      private static int resourcesCount;
    4.25      private static List<Resource> resources;
    4.26      private static ServerConfiguration conf;
    4.27 @@ -228,9 +230,8 @@
    4.28                  String s = new String(out.toByteArray(), "UTF-8");
    4.29                  socket.send(s);
    4.30              } catch (IOException ex) {
    4.31 -                Exceptions.printStackTrace(ex);
    4.32 +                LOG.log(Level.WARNING, "Error processing message " + text, ex);
    4.33              }
    4.34          }
    4.35 -        
    4.36      }
    4.37  }