Projects >> openshift-java-client >>9a7a08fe25d48bdb3be9c8b2b897236c94ff2dd6

Chunk
Conflicting content
    public static final int DEFAULT_CONNECT_TIMEOUT = 10 * 	1000;
    public static final int DEFAULT_READ_TIMEOUT = 2 * 60 * 1000;
<<<<<<< HEAD

    final long timeout = 1000;
	
=======
	public static final int NO_TIMEOUT = -1;

>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
	public void setUserAgent(String userAgent);
	
	public String getUserAgent();
Solution content
    public static final int DEFAULT_CONNECT_TIMEOUT = 10 * 	1000;
    public static final int DEFAULT_READ_TIMEOUT = 2 * 60 * 1000;
	public static final int NO_TIMEOUT = -1;

	public void setUserAgent(String userAgent);
	
	public String getUserAgent();
File
IHttpClient.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
	private static final Logger LOGGER = LoggerFactory.getLogger(UrlConnectionHttpClient.class);

<<<<<<< HEAD
	private static final int DEFAULT_CONNECT_TIMEOUT = 10 * 	1000;
	private static final int DEFAULT_READ_TIMEOUT = 2 * 60 * 1000;
    private static final int NO_TIMEOUT = -1;

=======
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
	private static final String SYSPROP_OPENSHIFT_CONNECT_TIMEOUT = "com.openshift.httpclient.timeout";
	private static final String SYSPROP_DEFAULT_CONNECT_TIMEOUT = "sun.net.client.defaultConnectTimeout";
	private static final String SYSPROP_DEFAULT_READ_TIMEOUT = "sun.net.client.defaultReadTimeout";
Solution content
	private static final Logger LOGGER = LoggerFactory.getLogger(UrlConnectionHttpClient.class);

	private static final String SYSPROP_OPENSHIFT_CONNECT_TIMEOUT = "com.openshift.httpclient.timeout";
	private static final String SYSPROP_DEFAULT_CONNECT_TIMEOUT = "sun.net.client.defaultConnectTimeout";
	private static final String SYSPROP_DEFAULT_READ_TIMEOUT = "sun.net.client.defaultReadTimeout";
File
UrlConnectionHttpClient.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
	}

	public String get(URL url) throws HttpClientException, SocketTimeoutException {
<<<<<<< HEAD
		return this.get(url, NO_TIMEOUT);
	}

    @Override
    public String get(URL url, int timeout) throws HttpClientException, SocketTimeoutException {

        HttpURLConnection connection = null;
        try {
            return write(null, HttpMethod.GET.toString(), url, timeout);
        } catch (SocketTimeoutException e){
            throw e;
        }
        catch (IOException e) {
            throw createException(e, connection);
        } finally {
            disconnect(connection);
        }
    }

    public void setUserAgent(String userAgent) {
=======
		return get(url, NO_TIMEOUT);
	}

	@Override
	public String get(URL url, int timeout) throws HttpClientException, SocketTimeoutException {

		HttpURLConnection connection = null;
		try {
			return write(null, HttpMethod.GET.toString(), url, timeout);
		} catch (SocketTimeoutException e) {
			throw e;
		/* TODO: cleanup exception handling */
		} catch (IOException e) {
			throw createException(e, connection);
		} finally {
			disconnect(connection);
		}
	}

	public void setUserAgent(String userAgent) {
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
		this.userAgent = userAgent;
	}
Solution content
	}

	public String get(URL url) throws HttpClientException, SocketTimeoutException {
		return get(url, NO_TIMEOUT);
	}

	@Override
	public String get(URL url, int timeout) throws HttpClientException, SocketTimeoutException {

		HttpURLConnection connection = null;
		try {
			return write(null, HttpMethod.GET.toString(), url, timeout);
		} catch (SocketTimeoutException e) {
			throw e;
		/* TODO: cleanup exception handling */
		} catch (IOException e) {
			throw createException(e, connection);
		} finally {
			disconnect(connection);
		}
	}

	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}
File
UrlConnectionHttpClient.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Method invocation
Method signature
Return statement
Chunk
Conflicting content
		return put(requestMediaType.encodeParameters(parameters), url);
	}

<<<<<<< HEAD
    @Override
    public String put(Map parameters, URL url, int timeout) throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
        return write(requestMediaType.encodeParameters(parameters), HttpMethod.PUT.toString(), url, timeout);
    }

    protected String put(String data, URL url) throws HttpClientException, SocketTimeoutException {
=======
	@Override
	public String put(Map parameters, URL url, int timeout) 
			throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
		return write(requestMediaType.encodeParameters(parameters), HttpMethod.PUT.toString(), url, timeout);
	}

	protected String put(String data, URL url) throws HttpClientException, SocketTimeoutException {
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
		return write(data, HttpMethod.PUT.toString(), url, NO_TIMEOUT);
	}
Solution content
		return put(requestMediaType.encodeParameters(parameters), url);
	}

	@Override
	public String put(Map parameters, URL url, int timeout) 
			throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
		return write(requestMediaType.encodeParameters(parameters), HttpMethod.PUT.toString(), url, timeout);
	}

	protected String put(String data, URL url) throws HttpClientException, SocketTimeoutException {
		return write(data, HttpMethod.PUT.toString(), url, NO_TIMEOUT);
	}
File
UrlConnectionHttpClient.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Method signature
Chunk
Conflicting content
	protected String post(String data, URL url) throws HttpClientException, SocketTimeoutException {
		return write(data, HttpMethod.POST.toString(), url, NO_TIMEOUT);
<<<<<<< HEAD
=======
	}

	public String post(Map data, URL url, int timeout) 
			throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
		return write(requestMediaType.encodeParameters(data), HttpMethod.POST.toString(), url, timeout);
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
	}

    public String post(Map data, URL url, int timeout) throws HttpClientException, SocketTimeoutException,
Solution content
	protected String post(String data, URL url) throws HttpClientException, SocketTimeoutException {
		return write(data, HttpMethod.POST.toString(), url, NO_TIMEOUT);
	}

    public String post(Map data, URL url, int timeout) throws HttpClientException, SocketTimeoutException,
File
UrlConnectionHttpClient.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Method signature
Return statement
Chunk
Conflicting content
		return delete(requestMediaType.encodeParameters(parameters), url);
	}

<<<<<<< HEAD
    @Override
    public String delete(Map parameters, URL url, int timeout) throws HttpClientException, SocketTimeoutException,
            UnsupportedEncodingException {
        return write(requestMediaType.encodeParameters(parameters), HttpMethod.DELETE.toString(), url, timeout);
    }

    public String delete(URL url)
=======
	@Override
	public String delete(Map parameters, URL url, int timeout) throws HttpClientException,
			SocketTimeoutException,
			UnsupportedEncodingException {
		return write(requestMediaType.encodeParameters(parameters), HttpMethod.DELETE.toString(), url, timeout);
	}

	public String delete(URL url)
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
			throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
		return delete((String) null, url);
	}
Solution content
		return delete(requestMediaType.encodeParameters(parameters), url);
	}

	@Override
	public String delete(Map parameters, URL url, int timeout) throws HttpClientException,
			SocketTimeoutException,
			UnsupportedEncodingException {
		return write(requestMediaType.encodeParameters(parameters), HttpMethod.DELETE.toString(), url, timeout);
	}

	public String delete(URL url)
			throws HttpClientException, SocketTimeoutException, UnsupportedEncodingException {
		return delete((String) null, url);
	}
File
UrlConnectionHttpClient.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Method signature
Chunk
Conflicting content
				StreamUtils.writeTo(data.getBytes(), connection.getOutputStream());
			}
			return StreamUtils.readToString(connection.getInputStream());
<<<<<<< HEAD
		} 
        catch (SocketTimeoutException e){
            throw e;
        }
        catch (IOException e) {
=======
		} catch (SocketTimeoutException e) {
			throw e;
		} catch (IOException e) {
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
			throw createException(e, connection);
		} finally {
			disconnect(connection);
Solution content
				StreamUtils.writeTo(data.getBytes(), connection.getOutputStream());
			}
			return StreamUtils.readToString(connection.getInputStream());
		} catch (SocketTimeoutException e) {
			throw e;
		} catch (IOException e) {
			throw createException(e, connection);
		} finally {
			disconnect(connection);
File
UrlConnectionHttpClient.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
			throws IOException {
		return createConnection(username, password, null, null, userAgent, url, NO_TIMEOUT);
	}
<<<<<<< HEAD
	
	protected HttpURLConnection createConnection(String username, String password, String authKey, String authIV,
            String userAgent, URL url, int timeout) throws IOException {
=======

	protected HttpURLConnection createConnection(String username, String password, String authKey, String authIV,
			String userAgent, URL url, int timeout) throws IOException {
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
		LOGGER.trace(
				"creating connection to {} using username \"{}\" and password \"{}\"", new Object[] { url, username,
						password });
Solution content
			throws IOException {
		return createConnection(username, password, null, null, userAgent, url, NO_TIMEOUT);
	}

	protected HttpURLConnection createConnection(String username, String password, String authKey, String authIV,
			String userAgent, URL url, int timeout) throws IOException {
		LOGGER.trace(
				"creating connection to {} using username \"{}\" and password \"{}\"", new Object[] { url, username,
						password });
File
UrlConnectionHttpClient.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
	}

	private void setConnectTimeout(URLConnection connection) {
<<<<<<< HEAD
		int timeout = getSystemPropertyInteger(SYSPROP_OPENSHIFT_CONNECT_TIMEOUT);
		if (timeout > NO_TIMEOUT) {
			connection.setConnectTimeout(timeout);
			return;
		}
		timeout = getSystemPropertyInteger(SYSPROP_DEFAULT_CONNECT_TIMEOUT);
		if (timeout == NO_TIMEOUT) {
			connection.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
		}
	}

	private void setReadTimeout(int timeout, URLConnection connection) {

        if(timeout > NO_TIMEOUT){
            connection.setReadTimeout(timeout);
            return;
        }

		timeout = getSystemPropertyInteger(SYSPROP_DEFAULT_READ_TIMEOUT);

        if (timeout == NO_TIMEOUT) {
			connection.setReadTimeout(DEFAULT_READ_TIMEOUT);
=======
		int timeout = getTimeout(
				getSystemPropertyInteger(SYSPROP_OPENSHIFT_CONNECT_TIMEOUT),
				getSystemPropertyInteger(SYSPROP_DEFAULT_CONNECT_TIMEOUT),
				DEFAULT_CONNECT_TIMEOUT);
		connection.setConnectTimeout(timeout);
	}

	private void setReadTimeout(int timeout, URLConnection connection) {
		timeout = getTimeout(timeout, getSystemPropertyInteger(SYSPROP_DEFAULT_READ_TIMEOUT), DEFAULT_READ_TIMEOUT);
		connection.setReadTimeout(timeout);
	}

	private int getTimeout(int timeout, int systemPropertyTimeout, int defaultTimeout) {
		if (timeout == NO_TIMEOUT) {
			timeout = systemPropertyTimeout;
			if (timeout == NO_TIMEOUT) {
				timeout = defaultTimeout;
			}
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
		}
		return timeout;
	}
Solution content
	}

	private void setConnectTimeout(URLConnection connection) {
		int timeout = getTimeout(
				getSystemPropertyInteger(SYSPROP_OPENSHIFT_CONNECT_TIMEOUT),
				getSystemPropertyInteger(SYSPROP_DEFAULT_CONNECT_TIMEOUT),
				DEFAULT_CONNECT_TIMEOUT);
		connection.setConnectTimeout(timeout);
	}

	private void setReadTimeout(int timeout, URLConnection connection) {
		timeout = getTimeout(timeout, getSystemPropertyInteger(SYSPROP_DEFAULT_READ_TIMEOUT), DEFAULT_READ_TIMEOUT);
		connection.setReadTimeout(timeout);
	}

	private int getTimeout(int timeout, int systemPropertyTimeout, int defaultTimeout) {
		if (timeout == NO_TIMEOUT) {
			timeout = systemPropertyTimeout;
			if (timeout == NO_TIMEOUT) {
				timeout = defaultTimeout;
			}
		}
		return timeout;
	}
File
UrlConnectionHttpClient.java
Developer's decision
Version 2
Kind of conflict
If statement
Method declaration
Method invocation
Method signature
Variable
Chunk
Conflicting content
        }
		}
	}

<<<<<<< HEAD
    @Test
    public void shouldRespectGivenTimeoutPOST() throws Throwable{

        final int timeout = 1000;
        final int serverDelay = timeout * 4;

        // pre-conditions
        assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
        Map dummyMap = Collections.emptyMap();

        long startTime = System.currentTimeMillis();
        // operations
        try{
            httpClient.post(dummyMap, serverFake.getUrl(), timeout);
            fail("Timeout expected.");
        }catch(SocketTimeoutException e){

            //assert
            assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
                    .isLessThan(serverDelay)
                    .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        }finally{
            serverFake.stop();
        }

    }

    @Test
    public void shouldRespectGivenTimeoutDELETE() throws Throwable{

        final int timeout = 1000;
        final int serverDelay = timeout * 4;

        // pre-conditions
        assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
        Map dummyMap = Collections.emptyMap();

        long startTime = System.currentTimeMillis();
        // operations
        try{
            httpClient.delete(dummyMap, serverFake.getUrl(), timeout);
            fail("Timeout expected.");
        }catch(SocketTimeoutException e){

            //assert
            assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
                    .isLessThan(serverDelay)
                    .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        }finally{
            serverFake.stop();
        }

    }

    @Test
    public void shouldRespectGivenTimeoutPUT() throws Throwable{

        final int timeout = 1000;
        final int serverDelay = timeout * 4;

        // pre-conditions
        assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
        Map dummyMap = Collections.emptyMap();

        long startTime = System.currentTimeMillis();
        // operations
        try{
            httpClient.put(dummyMap, serverFake.getUrl(), timeout);
            fail("Timeout expected.");
        }catch(SocketTimeoutException e){

            //assert
            assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
                    .isLessThan(serverDelay)
                    .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        }finally{
            serverFake.stop();

    }

    @Test
    public void shouldRespectGivenTimeoutGET() throws Throwable{

        final int timeout = 1000;
        final int serverDelay = timeout * 4;

        // pre-conditions
        assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);

        long startTime = System.currentTimeMillis();
        // operations
        try{
            httpClient.get(serverFake.getUrl(), timeout);
            fail("Timeout expected.");
        }catch(SocketTimeoutException e){

            //assert
            assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
                    .isLessThan(serverDelay)
                    .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
        }finally{
            serverFake.stop();
        }

    }
=======
	@Test
	public void shouldRespectGivenTimeoutPOST() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.post(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutDELETE() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.delete(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutPUT() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.put(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutGET() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);

		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.get(serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8

	protected HttpServerFake startHttServerFake(String statusLine) throws IOException {
		int port = new Random().nextInt(9 * 1024) + 1024;
Solution content
		}
	}

	@Test
	public void shouldRespectGivenTimeoutPOST() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.post(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutDELETE() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.delete(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutPUT() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);
		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.put(Collections.emptyMap(), serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	@Test
	public void shouldRespectGivenTimeoutGET() throws Throwable {
		// pre-conditions
		final int timeout = 1000;
		final int serverDelay = timeout * 4;
		assertThat(timeout).isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		WaitingHttpServerFake serverFake = this.startWaitingHttpServerFake(serverDelay);

		long startTime = System.currentTimeMillis();
		// operations
		try {
			httpClient.get(serverFake.getUrl(), timeout);
			fail("Timeout expected.");
		} catch (SocketTimeoutException e) {
			// assert
			assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
					.isLessThan(serverDelay)
					.isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
		} finally {
			serverFake.stop();
		}
	}

	protected HttpServerFake startHttServerFake(String statusLine) throws IOException {
		int port = new Random().nextInt(9 * 1024) + 1024;
File
HttpClientTest.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
		return serverFake;
	}

<<<<<<< HEAD
    protected WaitingHttpServerFake startWaitingHttpServerFake(int delay) throws IOException{

        WaitingHttpServerFake serverFake = new WaitingHttpServerFake(delay);
        serverFake.start();
        return serverFake;
    }
=======
	protected WaitingHttpServerFake startWaitingHttpServerFake(int delay) throws IOException {
		WaitingHttpServerFake serverFake = new WaitingHttpServerFake(delay);
		serverFake.start();
		return serverFake;
	}
>>>>>>> 7ad5ff3fb37325c785ea390cb51f8022eec62bc8
}
Solution content
		return serverFake;
	}

	protected WaitingHttpServerFake startWaitingHttpServerFake(int delay) throws IOException {
		WaitingHttpServerFake serverFake = new WaitingHttpServerFake(delay);
		serverFake.start();
		return serverFake;
	}
}
File
HttpClientTest.java
Developer's decision
Version 1
Kind of conflict
Method declaration