From ad3fbfb4cb485170c01c49ec6ffb287f8c59182a Mon Sep 17 00:00:00 2001 From: Christian Amend Date: Wed, 1 Oct 2014 11:04:34 +0200 Subject: [PATCH] [OLINGO-447] Remove previous invalid fix --- .../org/apache/olingo/fit/tecsvc/http/BasicHttpITCase.java | 2 +- .../java/org/apache/olingo/fit/tecsvc/http/PingITCase.java | 3 +++ .../java/org/apache/olingo/commons/api/format/AcceptType.java | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/BasicHttpITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/BasicHttpITCase.java index f8c4c2f3f..ba008d6f3 100644 --- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/BasicHttpITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/BasicHttpITCase.java @@ -107,6 +107,7 @@ public class BasicHttpITCase extends AbstractBaseTestITCase{ connection.setRequestMethod("GET"); connection.setRequestProperty(HttpHeader.ODATA_MAX_VERSION, "4.0"); + connection.setRequestProperty(HttpHeader.ACCEPT, "*/*"); connection.connect(); @@ -118,7 +119,6 @@ public class BasicHttpITCase extends AbstractBaseTestITCase{ @Override protected CommonODataClient getClient() { - // TODO Auto-generated method stub return null; } diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/PingITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/PingITCase.java index f706ddd8f..a8251ef46 100644 --- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/PingITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/http/PingITCase.java @@ -19,6 +19,7 @@ package org.apache.olingo.fit.tecsvc.http; import org.apache.olingo.client.api.CommonODataClient; +import org.apache.olingo.commons.api.http.HttpHeader; import org.apache.olingo.fit.AbstractBaseTestITCase; import org.apache.olingo.fit.tecsvc.TecSvcConst; import org.junit.Test; @@ -45,6 +46,7 @@ public class PingITCase extends AbstractBaseTestITCase{ HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); + connection.setRequestProperty(HttpHeader.ACCEPT, "*/*"); connection.connect(); int code = connection.getResponseCode(); @@ -60,6 +62,7 @@ public class PingITCase extends AbstractBaseTestITCase{ HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); + connection.setRequestProperty(HttpHeader.ACCEPT, "*/*"); connection.connect(); int code = connection.getResponseCode(); diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/AcceptType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/AcceptType.java index 21832423b..59eaa5dc5 100644 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/AcceptType.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/AcceptType.java @@ -112,9 +112,6 @@ public class AcceptType { typeSubtype.add(tokens[0]); typeSubtype.add(tokens[1]); } - } else if (tokens.length == 1 && "*".equals(tokens[0])) { - typeSubtype.add(tokens[0]); - typeSubtype.add(tokens[0]); } else { throw new IllegalArgumentException("Not exactly one '" + TypeUtil.TYPE_SUBTYPE_SEPARATOR + "' in format '" + format + "', or it is at the beginning or at the end.");