Revert changes to stable-5.3 that were only meant for neon3respin.

Revert "Add missing since tag."

This reverts commit ca81ecc3cf530c5ddf7d9cbfe034faf4d1115319.

Reapply "Bug 492235: Update to docker-client 3.6.8.""

This reverts commit 6ab4de77018f7f9cd4a7c108c69ffe86b56c37c1.

Change-Id: I5129490fecf9777cf36af6548d447326e8b323c5
Reviewed-on: https://git.eclipse.org/r/95514
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
diff --git a/containers/org.eclipse.linuxtools.docker.core/META-INF/MANIFEST.MF b/containers/org.eclipse.linuxtools.docker.core/META-INF/MANIFEST.MF
index b1dda02..1772c8f 100644
--- a/containers/org.eclipse.linuxtools.docker.core/META-INF/MANIFEST.MF
+++ b/containers/org.eclipse.linuxtools.docker.core/META-INF/MANIFEST.MF
@@ -11,9 +11,9 @@
  org.eclipse.equinox.registry;bundle-version="0.0.0",
  org.eclipse.equinox.security,
  org.eclipse.osgi,
- com.spotify.docker.client;bundle-version="3.4.0",
- jnr.unixsocket;bundle-version="0.4.0",
- jnr.enxio;bundle-version="0.5.0",
+ com.spotify.docker.client;bundle-version="[3.6.8, 3.6.9)",
+ com.github.jnr.unixsocket;bundle-version="0.4.0",
+ com.github.jnr.enxio;bundle-version="0.5.0",
  javax.ws.rs;bundle-version="2.0.1",
  org.glassfish.jersey.core.jersey-client;bundle-version="2.14.0",
  org.glassfish.jersey.media.jersey-media-json-jackson;bundle-version="2.14.0",
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java
index 8b7beda..5027c4d 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/Messages.java
@@ -15,9 +15,6 @@
 public class Messages extends NLS {
 
 	public static String Default_Name;
-	/**
-	 * @since 2.3
-	 */
 	public static String Unnamed;
 	public static String Image_Not_Found_Header;
 	public static String Image_Pull_Failed_Header;
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index 42ba39f..8854193 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -14,8 +14,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.PrintStream;
-import java.lang.reflect.Field;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.SocketException;
@@ -98,7 +96,6 @@
 import com.spotify.docker.client.DockerClient.AttachParameter;
 import com.spotify.docker.client.DockerClient.BuildParam;
 import com.spotify.docker.client.DockerClient.ExecCreateParam;
-import com.spotify.docker.client.DockerClient.ExecStartParameter;
 import com.spotify.docker.client.DockerClient.LogsParam;
 import com.spotify.docker.client.DockerTimeoutException;
 import com.spotify.docker.client.LogStream;
@@ -1268,20 +1265,8 @@
 			final DockerProgressHandler d = new DockerProgressHandler(handler);
 			final java.nio.file.Path p = FileSystems.getDefault()
 					.getPath(path.makeAbsolute().toOSString());
-			/*
-			 * Workaround error message thrown to stderr due to
-			 * lack of Guava 18.0. Remove this when we begin
-			 * using Guava 18.0.
-			 */
-			PrintStream oldErr = System.err;
-			System.setErr(new PrintStream(new OutputStream() {
-				@Override
-				public void write(int b) {
-				}
-			}));
 			String res = getClientCopy().build(p, d,
 					BuildParam.create("forcerm", "true")); //$NON-NLS-1$ //$NON-NLS-2$
-			System.setErr(oldErr);
 			return res;
 		} catch (com.spotify.docker.client.DockerRequestException e) {
 			throw new DockerException(e.message());
@@ -1299,20 +1284,8 @@
 			DockerProgressHandler d = new DockerProgressHandler(handler);
 			java.nio.file.Path p = FileSystems.getDefault().getPath(
 					path.makeAbsolute().toOSString());
-			/*
-			 * Workaround error message thrown to stderr due to
-			 * lack of Guava 18.0. Remove this when we begin
-			 * using Guava 18.0.
-			 */
-			PrintStream oldErr = System.err;
-			System.setErr(new PrintStream(new OutputStream() {
-				@Override
-				public void write(int b) {
-				}
-			}));
 			String res = getClientCopy().build(p, name, d,
 					BuildParam.create("forcerm", "true")); //$NON-NLS-1$ $NON-NLS-2$
-			System.setErr(oldErr);
 			return res;
 		} catch (com.spotify.docker.client.DockerRequestException e) {
 			throw new DockerException(e.message());
@@ -1348,20 +1321,8 @@
 			final DockerProgressHandler d = new DockerProgressHandler(handler);
 			final java.nio.file.Path p = FileSystems.getDefault()
 					.getPath(path.makeAbsolute().toOSString());
-			/*
-			 * Workaround error message thrown to stderr due to
-			 * lack of Guava 18.0. Remove this when we begin
-			 * using Guava 18.0.
-			 */
-			PrintStream oldErr = System.err;
-			System.setErr(new PrintStream(new OutputStream() {
-				@Override
-				public void write(int b) {
-				}
-			}));
 			String res = getClientCopy().build(p, name, d,
 					getBuildParameters(buildOptions));
-			System.setErr(oldErr);
 			return res;
 		} catch (com.spotify.docker.client.DockerRequestException e) {
 			throw new DockerException(e.message());
@@ -1535,24 +1496,12 @@
 				builder = builder.onBuild(c.onBuild());
 			}
 
-			/*
-			 * Workaround error message thrown to stderr due to
-			 * lack of Guava 18.0. Remove this when we begin
-			 * using Guava 18.0.
-			 */
-			PrintStream oldErr = System.err;
-			System.setErr(new PrintStream(new OutputStream() {
-				@Override
-				public void write(int b) {
-				}
-			}));
 			// create container with default random name if an empty/null
 			// containerName argument was passed
 			final ContainerCreation creation = client
 					.createContainer(builder.build(),
 					(containerName != null && !containerName.isEmpty())
 							? containerName : null);
-			System.setErr(oldErr);
 			final String id = creation.id();
 			// force a refresh of the current containers to include the new one
 			listContainers();
@@ -1809,19 +1758,8 @@
 		ContainerInfo info;
 		try {
 			info = client.inspectContainer(id);
-			/*
-			 * Workaround error message thrown to stderr due to lack of Guava
-			 * 18.0. Remove this when we begin using Guava 18.0.
-			 */
-			PrintStream oldErr = System.err;
-			System.setErr(new PrintStream(new OutputStream() {
-				@Override
-				public void write(int b) {
-				}
-			}));
 			client.commitContainer(id, repo, tag, info.config(), comment,
 					author);
-			System.setErr(oldErr);
 			// update images list
 			// FIXME: are we refreshing the list of images twice ?
 			listImages();
@@ -2127,21 +2065,9 @@
 					ExecCreateParam.attachStderr(),
 					ExecCreateParam.attachStdin(),
 					ExecCreateParam.tty());
-			/*
-			 * Temporary workaround for lack of support for 'Tty'.
-			 * We do not use DETACH so modify it in this scope to
-			 * pass 'Tty' to the execStart call.
-			 * This can be removed once
-			 * https://github.com/spotify/docker-client/pull/351
-			 * is accepted.
-			 */
-			String realValue = ExecStartParameter.DETACH.getName();
-			Field fname = ExecStartParameter.class.getDeclaredField("name"); //$NON-NLS-1$
-			fname.setAccessible(true);
-			fname.set(ExecStartParameter.DETACH, "Tty"); //$NON-NLS-1$
+
 			final LogStream pty_stream = client.execStart(execId,
-					DockerClient.ExecStartParameter.DETACH);
-			fname.set(ExecStartParameter.DETACH, realValue);
+					DockerClient.ExecStartParameter.TTY);
 			final IDockerContainerInfo info = getContainerInfo(id);
 			openTerminal(pty_stream, info.name() + " [shell]"); //$NON-NLS-1$
 		} catch (Exception e) {
diff --git a/containers/org.eclipse.linuxtools.docker.ui/META-INF/MANIFEST.MF b/containers/org.eclipse.linuxtools.docker.ui/META-INF/MANIFEST.MF
index b864f88..655601b 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/META-INF/MANIFEST.MF
+++ b/containers/org.eclipse.linuxtools.docker.ui/META-INF/MANIFEST.MF
@@ -23,7 +23,7 @@
  org.eclipse.jface.databinding;bundle-version="1.7.0",
  org.eclipse.debug.core;bundle-version="3.10.0",
  org.eclipse.debug.ui;bundle-version="3.11.0",
- com.spotify.docker.client;bundle-version="3.1.1",
+ com.spotify.docker.client;bundle-version="3.6.8",
  org.eclipse.linuxtools.docker.editor,
  org.eclipse.e4.ui.workbench;bundle-version="1.4.0",
  org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0",
diff --git a/releng/org.eclipse.linuxtools.docker-site/category.xml b/releng/org.eclipse.linuxtools.docker-site/category.xml
index d7e32a8..0dfe5c3 100644
--- a/releng/org.eclipse.linuxtools.docker-site/category.xml
+++ b/releng/org.eclipse.linuxtools.docker-site/category.xml
@@ -24,6 +24,12 @@
         <category name="Docker Client Dependencies"/>
    </iu>
 
+   <iu id="org.apache.httpcomponents.httpcore" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
+   <iu id="org.apache.httpcomponents.httpclient" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
    <iu id="com.fasterxml.jackson.core.jackson-annotations" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
@@ -42,28 +48,28 @@
    <iu id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="0.0.0">
-        <category name="Docker Client Dependencies"/>
-   </iu>
    <iu id="javax.ws.rs" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="com.kenai.jffi" version="0.0.0">
+   <iu id="com.github.jnr.jffi" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="jnr.constants" version="0.0.0">
+   <iu id="com.github.jnr.jffi.native" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="jnr.enxio" version="0.0.0">
+   <iu id="com.github.jnr.constants" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="jnr.ffi" version="0.0.0">
+   <iu id="com.github.jnr.enxio" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="jnr.posix" version="0.0.0">
+   <iu id="com.github.jnr.ffi" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
-   <iu id="jnr.unixsocket" version="0.0.0">
+   <iu id="com.github.jnr.posix" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
+   <iu id="com.github.jnr.unixsocket" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
    <iu id="jnr.x86asm" version="0.0.0">
@@ -102,6 +108,12 @@
    <iu id="org.glassfish.jersey.media.jersey-media-json-jackson" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
+   <iu id="org.glassfish.jersey.ext.entityfiltering" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
+   <iu id="org.glassfish.jersey.core.jersey-server" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
    <iu id="javassist" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
@@ -117,6 +129,15 @@
    <iu id="org.objectweb.asm" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
+   <iu id="org.objectweb.asm.tree" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
+   <iu id="org.objectweb.asm.util" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
+   <iu id="org.objectweb.asm.analysis" version="0.0.0">
+        <category name="Docker Client Dependencies"/>
+   </iu>
    <iu id="org.apache.commons.compress" version="0.0.0">
         <category name="Docker Client Dependencies"/>
    </iu>
diff --git a/releng/org.eclipse.linuxtools.target/linuxtools-e4.6.target b/releng/org.eclipse.linuxtools.target/linuxtools-e4.6.target
index 46f0674..3e404e6 100644
--- a/releng/org.eclipse.linuxtools.target/linuxtools-e4.6.target
+++ b/releng/org.eclipse.linuxtools.target/linuxtools-e4.6.target
@@ -1,21 +1,18 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?><target name="linuxtools-e4.6" sequenceNumber="4">
+<?pde version="3.8"?><target name="linuxtools-e4.6" sequenceNumber="5">
 <locations>
 <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
 <unit id="org.swtchart" version="0.0.0"/>
 <unit id="org.cyberneko.html" version="0.0.0"/>
 <unit id="org.apache.xerces" version="0.0.0"/>
 <unit id="org.objectweb.asm" version="0.0.0"/>
-
-<unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="0.0.0"/>
-<unit id="com.spotify.docker.client" version="0.0.0"/>
-<unit id="com.spotify.docker.client.source" version="0.0.0"/>
+<unit id="com.spotify.docker.client" version="3.6.8.v20170223-1848"/>
+<unit id="com.spotify.docker.client.source" version="3.6.8.v20170223-1848"/>
 <unit id="org.bouncycastle.bcprov" version="0.0.0"/>
 <unit id="org.bouncycastle.bcpkix" version="0.0.0"/>
 <unit id="org.mockito" version="0.0.0"/>
 <unit id="org.assertj" version="0.0.0"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20160916162009/repository/"/>
-<repository location="http://download.eclipse.org/linuxtools/docker-client"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20170306214312/repository/"/>
 </location>
 <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
 <unit id="org.eclipse.cdt.feature.group" version="0.0.0"/>