Chrome-Java5-Patch.txt
changeset 118 174ae9d017fe
parent 117 1796bc92daed
parent 116 c60cb2ffbdc1
child 120 94a8b7890e14
equal deleted inserted replaced
117:1796bc92daed 118:174ae9d017fe
     1 ### Eclipse Workspace Patch 1.0
       
     2 #P org.chromium.sdk
       
     3 Index: src/org/chromium/sdk/ChromiumIOException.java
       
     4 ===================================================================
       
     5 --- src/org/chromium/sdk/ChromiumIOException.java	(revision 0)
       
     6 +++ src/org/chromium/sdk/ChromiumIOException.java	(revision 0)
       
     7 @@ -0,0 +1,23 @@
       
     8 +package org.chromium.sdk;
       
     9 +
       
    10 +import java.io.IOException;
       
    11 +
       
    12 +public class ChromiumIOException extends IOException {
       
    13 +	private static final long serialVersionUID = 3412049732071131594L;
       
    14 +	private final Throwable cause;
       
    15 +
       
    16 +	public ChromiumIOException(Throwable cause) {
       
    17 +		super();
       
    18 +		this.cause = cause;
       
    19 +	}
       
    20 +	
       
    21 +	public ChromiumIOException(String message, Throwable cause) {
       
    22 +		super(message);
       
    23 +		this.cause = cause;
       
    24 +	}
       
    25 +	
       
    26 +	@Override
       
    27 +	public Throwable getCause() {
       
    28 +		return cause;
       
    29 +	}
       
    30 +}
       
    31 Index: src/org/chromium/sdk/internal/BrowserImpl.java
       
    32 ===================================================================
       
    33 --- src/org/chromium/sdk/internal/BrowserImpl.java	(revision 306)
       
    34 +++ src/org/chromium/sdk/internal/BrowserImpl.java	(working copy)
       
    35 @@ -17,6 +17,7 @@
       
    36  
       
    37  import org.chromium.sdk.Browser;
       
    38  import org.chromium.sdk.BrowserTab;
       
    39 +import org.chromium.sdk.ChromiumIOException;
       
    40  import org.chromium.sdk.TabDebugEventListener;
       
    41  import org.chromium.sdk.UnsupportedVersionException;
       
    42  import org.chromium.sdk.Version;
       
    43 @@ -102,7 +103,7 @@
       
    44        try {
       
    45          serverVersionString = devToolsHandler.version(OPERATION_TIMEOUT_MS);
       
    46        } catch (TimeoutException e) {
       
    47 -        throw new IOException("Failed to get protocol version from remote", e);
       
    48 +        throw new ChromiumIOException("Failed to get protocol version from remote", e);
       
    49        }
       
    50        if (serverVersionString == null) {
       
    51          throw new UnsupportedVersionException(BrowserImpl.PROTOCOL_VERSION, null);
       
    52 @@ -291,7 +292,7 @@
       
    53          ticket = connectInternal();
       
    54        } catch (UnsupportedVersionException e) {
       
    55          // This exception should have happened on tab fetcher creation.
       
    56 -        throw new IOException("Unexpected version problem", e);
       
    57 +        throw new ChromiumIOException("Unexpected version problem", e);
       
    58        }
       
    59  
       
    60        Session session = ticket.getSession();
       
    61 Index: META-INF/MANIFEST.MF
       
    62 ===================================================================
       
    63 --- META-INF/MANIFEST.MF	(revision 306)
       
    64 +++ META-INF/MANIFEST.MF	(working copy)
       
    65 @@ -13,4 +13,5 @@
       
    66   org.chromium.sdk.internal.tools.v8.processor;x-internal:=true,
       
    67   org.chromium.sdk.internal.tools.v8.request;x-internal:=true,
       
    68   org.chromium.sdk.internal.transport;x-internal:=true
       
    69 -Bundle-RequiredExecutionEnvironment: JavaSE-1.6
       
    70 +Bundle-RequiredExecutionEnvironment: J2SE-1.5,
       
    71 + JavaSE-1.6
       
    72 Index: src/org/chromium/sdk/internal/BrowserTabImpl.java
       
    73 ===================================================================
       
    74 --- src/org/chromium/sdk/internal/BrowserTabImpl.java	(revision 306)
       
    75 +++ src/org/chromium/sdk/internal/BrowserTabImpl.java	(working copy)
       
    76 @@ -8,6 +8,7 @@
       
    77  
       
    78  import org.chromium.sdk.Browser;
       
    79  import org.chromium.sdk.BrowserTab;
       
    80 +import org.chromium.sdk.ChromiumIOException;
       
    81  import org.chromium.sdk.DebugEventListener;
       
    82  import org.chromium.sdk.TabDebugEventListener;
       
    83  import org.chromium.sdk.internal.tools.ToolHandler;
       
    84 @@ -89,7 +90,7 @@
       
    85        try {
       
    86          result = devToolSessionManager.attachToTab();
       
    87        } catch (AttachmentFailureException e) {
       
    88 -        throw new IOException(e);
       
    89 +        throw new ChromiumIOException(e);
       
    90        }
       
    91        if (Result.OK != result) {
       
    92          throw new IOException("Failed to attach with result: " + result);
       
    93 Index: src/org/chromium/sdk/internal/StandaloneVmImpl.java
       
    94 ===================================================================
       
    95 --- src/org/chromium/sdk/internal/StandaloneVmImpl.java	(revision 306)
       
    96 +++ src/org/chromium/sdk/internal/StandaloneVmImpl.java	(working copy)
       
    97 @@ -12,6 +12,7 @@
       
    98  import java.util.logging.Level;
       
    99  import java.util.logging.Logger;
       
   100  
       
   101 +import org.chromium.sdk.ChromiumIOException;
       
   102  import org.chromium.sdk.DebugEventListener;
       
   103  import org.chromium.sdk.StandaloneVm;
       
   104  import org.chromium.sdk.UnsupportedVersionException;
       
   105 @@ -121,9 +122,9 @@
       
   106      } catch (InterruptedException e) {
       
   107        throw new RuntimeException(e);
       
   108      } catch (ExecutionException e) {
       
   109 -      throw new IOException("Failed to get version", e);
       
   110 +      throw new ChromiumIOException("Failed to get version", e);
       
   111      } catch (TimeoutException e) {
       
   112 -      throw new IOException("Timed out waiting for version", e);
       
   113 +      throw new ChromiumIOException("Timed out waiting for version", e);
       
   114      }
       
   115  
       
   116      String versionString = remoteInfo.getProtocolVersion();
       
   117 Index: src/org/chromium/sdk/internal/transport/Handshaker.java
       
   118 ===================================================================
       
   119 --- src/org/chromium/sdk/internal/transport/Handshaker.java	(revision 306)
       
   120 +++ src/org/chromium/sdk/internal/transport/Handshaker.java	(working copy)
       
   121 @@ -10,8 +10,8 @@
       
   122  import java.util.concurrent.ExecutionException;
       
   123  import java.util.concurrent.Future;
       
   124  import java.util.concurrent.FutureTask;
       
   125 -import java.util.concurrent.RunnableFuture;
       
   126  
       
   127 +import org.chromium.sdk.ChromiumIOException;
       
   128  import org.chromium.sdk.LineReader;
       
   129  import org.chromium.sdk.internal.transport.Message.MalformedMessageException;
       
   130  
       
   131 @@ -85,7 +85,7 @@
       
   132        return runnableFuture;
       
   133      }
       
   134  
       
   135 -    private final RunnableFuture<RemoteInfo> runnableFuture =
       
   136 +    private final FutureTask<RemoteInfo> runnableFuture =
       
   137          new FutureTask<RemoteInfo>(new HandshakeTaks());
       
   138  
       
   139      private LineReader input = null;
       
   140 @@ -100,7 +100,7 @@
       
   141        } catch (InterruptedException e) {
       
   142          throw new RuntimeException(e);
       
   143        } catch (ExecutionException e) {
       
   144 -        throw new IOException("Failed to perform handshake", e);
       
   145 +        throw new ChromiumIOException("Failed to perform handshake", e);
       
   146        }
       
   147  
       
   148      }
       
   149 @@ -111,7 +111,7 @@
       
   150          try {
       
   151            message = Message.fromBufferedReader(input);
       
   152          } catch (MalformedMessageException e) {
       
   153 -          throw new IOException("Unrecognized handshake message from remote", e);
       
   154 +          throw new ChromiumIOException("Unrecognized handshake message from remote", e);
       
   155          }
       
   156          if (message == null) {
       
   157            throw new IOException("End of stream");
       
   158 #P org.chromium.debug.core
       
   159 Index: META-INF/MANIFEST.MF
       
   160 ===================================================================
       
   161 --- META-INF/MANIFEST.MF	(revision 306)
       
   162 +++ META-INF/MANIFEST.MF	(working copy)
       
   163 @@ -20,4 +20,5 @@
       
   164   org.chromium.debug.core.model,
       
   165   org.chromium.debug.core.util
       
   166  Eclipse-LazyStart: true
       
   167 -Bundle-RequiredExecutionEnvironment: JavaSE-1.6
       
   168 +Bundle-RequiredExecutionEnvironment: J2SE-1.5,
       
   169 + JavaSE-1.6
       
   170 #P org.chromium.debug.ui
       
   171 Index: META-INF/MANIFEST.MF
       
   172 ===================================================================
       
   173 --- META-INF/MANIFEST.MF	(revision 306)
       
   174 +++ META-INF/MANIFEST.MF	(working copy)
       
   175 @@ -16,4 +16,5 @@
       
   176   org.chromium.debug.core;bundle-version="0.1.5",
       
   177   org.chromium.sdk;bundle-version="0.1.5"
       
   178  Bundle-ActivationPolicy: lazy
       
   179 -Bundle-RequiredExecutionEnvironment: JavaSE-1.6
       
   180 +Bundle-RequiredExecutionEnvironment: J2SE-1.5,
       
   181 + JavaSE-1.6