Skip to content

Commit

Permalink
Don't leave running threads. Use full path of ad-hosts.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
hollingsworthd committed Dec 3, 2015
1 parent 3ca72ac commit 7b3dfcf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.machinepublishers.jbrowserdriver;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface JavaFxObjectRemote extends Remote {
public interface JavaFxObjectRemote {
Object unwrap() throws RemoteException;

boolean is(Class<?> type) throws RemoteException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import com.machinepublishers.browser.Browser.Fatal;

class JavaFxObjectServer extends UnicastRemoteObject implements JavaFxObjectRemote {
class JavaFxObjectServer implements JavaFxObjectRemote {
private final Object object;

JavaFxObjectServer(Object object) throws RemoteException {
Expand Down
3 changes: 1 addition & 2 deletions src/com/machinepublishers/jbrowserdriver/JavaFxRemote.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.machinepublishers.jbrowserdriver;

import java.io.File;
import java.rmi.Remote;
import java.rmi.RemoteException;

public interface JavaFxRemote extends Remote {
public interface JavaFxRemote {

JavaFxObjectRemote getNew(String type, Long id, Object... params) throws RemoteException;

Expand Down
3 changes: 1 addition & 2 deletions src/com/machinepublishers/jbrowserdriver/JavaFxServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.machinepublishers.browser.Browser.Fatal;

class JavaFxServer extends UnicastRemoteObject implements JavaFxRemote {
class JavaFxServer implements JavaFxRemote {
JavaFxServer() throws RemoteException {}

private final Map<Long, ClassLoader> classLoaders = new HashMap<Long, ClassLoader>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class StreamConnection extends HttpURLConnection implements Closeable {
BufferedReader reader = null;
try {
reader = new BufferedReader(
new InputStreamReader(StreamConnection.class.getResourceAsStream("./ad-hosts.txt")));
new InputStreamReader(StreamConnection.class.getResourceAsStream("/com/machinepublishers/jbrowserdriver/ad-hosts.txt")));
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
adHosts.add(line);
}
Expand Down

0 comments on commit 7b3dfcf

Please sign in to comment.