From 85a3e0e813143dd4730d4bd6e1d85c2846c4c6c3 Mon Sep 17 00:00:00 2001 From: fmartelli Date: Sat, 19 Apr 2014 13:01:17 +0200 Subject: [PATCH] [OLINGO-175, OLINGO-205, OLINGO-246] fix fo build --- fit/src/main/java/org/apache/olingo/fit/AbstractServices.java | 3 +-- .../request/batch/AbstractBatchStreamManager.java | 4 ++-- .../request/batch/AbstractODataBatchRequest.java | 4 ++++ .../org/apache/olingo/client/core/it/v4/BatchTestITCase.java | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java index 9c158d136..2ed2053a5 100644 --- a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java +++ b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java @@ -212,8 +212,7 @@ public abstract class AbstractServices { final boolean continueOnError = prefer.contains("odata.continue-on-error"); return xml.createBatchResponse( - exploreMultipart(attachment.getAllAttachments(), BOUNDARY, continueOnError), - BOUNDARY); + exploreMultipart(attachment.getAllAttachments(), BOUNDARY, continueOnError), BOUNDARY); } catch (IOException e) { return xml.createFaultResponse(Accept.XML.toString(version), e); } diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java index aa05f369f..52c40e61a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java @@ -67,7 +67,7 @@ public abstract class AbstractBatchStreamManager extends AbstractODataStreamMana streamDashBoundary(); final ODataChangesetResponseItem expectedResItem = new ODataChangesetResponseItem(); - ((AbstractODataBatchRequest) req).expectedResItems.add(expectedResItem); + ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem); currentItem = new ODataChangesetImpl(req, expectedResItem); @@ -88,7 +88,7 @@ public abstract class AbstractBatchStreamManager extends AbstractODataStreamMana final ODataRetrieveResponseItem expectedResItem = new ODataRetrieveResponseItem(); currentItem = new ODataRetrieveImpl(req, expectedResItem); - ((AbstractODataBatchRequest) req).expectedResItems.add(expectedResItem); + ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem); return (ODataRetrieve) currentItem; } diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java index fd24a699f..606dec9d3 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java @@ -49,6 +49,10 @@ public abstract class AbstractODataBatchRequest expectedResItems = new ArrayList(); + protected void addExpectedResItem(ODataBatchResponseItem item) { + expectedResItems.add(item); + } + /** * Constructor. * diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/BatchTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/BatchTestITCase.java index aabcd6d37..d9b7293a2 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/BatchTestITCase.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/BatchTestITCase.java @@ -80,7 +80,8 @@ public class BatchTestITCase extends AbstractTestITCase { // ------------------------ // Uncomment to performe check externally ... // ------------------------ - // private final static String testStaticServiceRootURL= "http://odatae2etest.azurewebsites.net/javatest/DefaultService/"; + // private final static String testStaticServiceRootURL= + // "http://odatae2etest.azurewebsites.net/javatest/DefaultService/"; // private final static String ACCEPT = ContentType.MULTIPART_MIXED; // ------------------------ private final static String ACCEPT = ContentType.APPLICATION_OCTET_STREAM;