You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/09/02 13:49:47 UTC

[27/50] [abbrv] git commit: [OLINGO-335] Run Code cleanup

[OLINGO-335] Run Code cleanup


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/6a866625
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/6a866625
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/6a866625

Branch: refs/heads/Olingo-129_PocJpaDataStore
Commit: 6a866625f5fdbde39a1d6c82d0d28f472adef972
Parents: 81dfcfa
Author: Christian Amend <ch...@apache.org>
Authored: Tue Jul 1 16:22:36 2014 +0200
Committer: Christian Amend <ch...@apache.org>
Committed: Tue Jul 1 16:22:36 2014 +0200

----------------------------------------------------------------------
 .../api/ODataJPATombstoneEntityListener.java    |  2 ++
 .../jpa/processor/core/access/data/JPAPage.java |  4 +--
 .../core/access/data/JPAProcessorImpl.java      |  2 +-
 .../core/access/model/JPATypeConvertor.java     |  2 +-
 .../processor/core/model/JPAEdmProperty.java    |  3 +-
 .../core/access/data/JPAPageBuilderTest.java    |  5 +--
 .../SalesOrderItemTombstoneListener.java        |  4 +--
 .../listeners/SalesOrderTombstoneListener.java  |  4 +--
 .../jpa/processor/ref/model/Category.java       |  2 +-
 .../jpa/processor/ref/model/Customer.java       |  2 +-
 .../api/ep/EntityProviderWriteProperties.java   |  5 ++-
 .../odata2/api/processor/ODataResponse.java     |  6 ++--
 .../olingo/odata2/core/ODataRequestImpl.java    |  6 ++--
 .../odata2/core/batch/BatchRequestParser.java   | 16 +++++-----
 .../odata2/core/batch/BatchRequestWriter.java   |  2 +-
 .../odata2/core/batch/BatchResponseParser.java  | 10 +++---
 .../edm/provider/EdmAssociationImplProv.java    |  4 +--
 .../ep/producer/AtomEntryEntityProducer.java    |  3 +-
 .../odata2/core/servlet/ODataServlet.java       |  9 +++---
 .../olingo/odata2/core/ODataRequestTest.java    |  4 +--
 .../odata2/core/batch/BatchRequestTest.java     | 26 ++++++++--------
 .../core/batch/BatchRequestWriterTest.java      | 20 ++++++------
 .../odata2/core/batch/BatchResponseTest.java    | 17 ++++++-----
 .../odata2/core/ep/AbstractProviderTest.java    |  2 +-
 .../consumer/JsonEntryDeepInsertEntryTest.java  |  2 +-
 .../core/ep/consumer/XmlFeedConsumerTest.java   |  6 ++--
 .../producer/JsonEntryEntityProducerTest.java   |  2 +-
 .../odata2/core/servlet/ODataServletTest.java   | 32 ++++++++++----------
 .../odata2/ref/edm/ScenarioEdmProvider.java     |  8 ++---
 .../odata2/testutil/helper/StringHelper.java    | 32 +++++++++++---------
 30 files changed, 125 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATombstoneEntityListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATombstoneEntityListener.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATombstoneEntityListener.java
index f120ab9..ec28842 100644
--- a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATombstoneEntityListener.java
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATombstoneEntityListener.java
@@ -19,8 +19,10 @@
 package org.apache.olingo.odata2.jpa.processor.api;
 
 import java.util.List;
+
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
+
 import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
 
 /**

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPage.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPage.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPage.java
index 281d7ce..7aff111 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPage.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPage.java
@@ -203,8 +203,8 @@ public class JPAPage implements JPAPaging {
       return this;
     }
 
-    public JPAPageBuilder entities(List<Object> result) {
-      this.entities = result;
+    public JPAPageBuilder entities(final List<Object> result) {
+      entities = result;
       return this;
     }
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
index a7bcf35..fdef108 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
@@ -196,7 +196,7 @@ public class JPAProcessorImpl implements JPAProcessor {
     }
   }
 
-  private List<Object> handlePaging(List<Object> result, GetEntitySetUriInfo uriParserResultView) {
+  private List<Object> handlePaging(final List<Object> result, final GetEntitySetUriInfo uriParserResultView) {
     if (result == null) {
       return null;
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPATypeConvertor.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPATypeConvertor.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPATypeConvertor.java
index 9548d63..8ea1ce3 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPATypeConvertor.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPATypeConvertor.java
@@ -22,9 +22,9 @@ import java.lang.reflect.AnnotatedElement;
 import java.math.BigDecimal;
 import java.sql.Blob;
 import java.sql.Clob;
+import java.sql.Date;
 import java.sql.Timestamp;
 import java.util.Calendar;
-import java.sql.Date;
 import java.util.UUID;
 
 import javax.persistence.Lob;

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/model/JPAEdmProperty.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/model/JPAEdmProperty.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/model/JPAEdmProperty.java
index dbae270..fd14794 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/model/JPAEdmProperty.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/model/JPAEdmProperty.java
@@ -365,7 +365,8 @@ public class JPAEdmProperty extends JPAEdmBaseViewImpl implements
       }
     }
 
-    private void buildForeignKey(JoinColumn joinColumn, Attribute<?, ?> jpaAttribute) throws ODataJPAModelException,
+    private void buildForeignKey(final JoinColumn joinColumn, final Attribute<?, ?> jpaAttribute)
+        throws ODataJPAModelException,
         ODataJPARuntimeException {
       joinColumnNames = joinColumnNames == null ? new ArrayList<String[]>() : joinColumnNames;
       String[] name = { null, null };

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPageBuilderTest.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPageBuilderTest.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPageBuilderTest.java
index b9e6894..0232163 100644
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPageBuilderTest.java
+++ b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAPageBuilderTest.java
@@ -62,8 +62,6 @@ public class JPAPageBuilderTest {
     assertEquals(10, query.getMaxResults());
   }
 
-
-
   @Test
   public void testBuildDefaultZeroPage() {
     JPAPageBuilder pageBuilder = new JPAPageBuilder();
@@ -84,7 +82,7 @@ public class JPAPageBuilderTest {
     assertEquals(0, query.getMaxResults());
   }
 
-   @Test
+  @Test
   public void testBuildWithNoSkipToken() {
     JPAPageBuilder pageBuilder = new JPAPageBuilder();
     Query query = mockQuery(false);
@@ -559,5 +557,4 @@ public class JPAPageBuilderTest {
     };
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
index 036db52..05de214 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
- *
+ * 
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
index ea162ae..0545eac 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
- *
+ * 
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
index f0ff23f..7c8965e 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
@@ -57,7 +57,7 @@ public class Category {
     return id;
   }
 
-  public void setId(long id) {
+  public void setId(final long id) {
     this.id = id;
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
index d95c91e..48243d0 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
@@ -86,7 +86,7 @@ public class Customer {
     return createdAt;
   }
 
-  public void setCreatedAt(Timestamp createdAt) {
+  public void setCreatedAt(final Timestamp createdAt) {
     this.createdAt = createdAt;
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java b/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
index 4273b30..cd6aad6 100644
--- a/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
+++ b/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
@@ -215,17 +215,16 @@ public class EntityProviderWriteProperties {
       return this;
     }
 
-    public ODataEntityProviderPropertiesBuilder omitJsonWrapper(boolean omitJsonWrapper) {
+    public ODataEntityProviderPropertiesBuilder omitJsonWrapper(final boolean omitJsonWrapper) {
       properties.omitJsonWrapper = omitJsonWrapper;
       return this;
     }
 
-    public ODataEntityProviderPropertiesBuilder contentOnly(boolean contentOnly) {
+    public ODataEntityProviderPropertiesBuilder contentOnly(final boolean contentOnly) {
       properties.contentOnly = contentOnly;
       return this;
     }
 
-    
     public ODataEntityProviderPropertiesBuilder fromProperties(final EntityProviderWriteProperties properties) {
       this.properties.inlineCountType = properties.getInlineCountType();
       this.properties.inlineCount = properties.getInlineCount();

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java b/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
index 57e41c6..2035b25 100644
--- a/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
+++ b/odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
@@ -55,16 +55,16 @@ public abstract class ODataResponse {
 
   /**
    * @return a response entity as inputStream which becomes the body part of a response message
-   * @throws ODataException throws ODataException in case of entity is not a stream (internal ClassCastException) 
+   * @throws ODataException throws ODataException in case of entity is not a stream (internal ClassCastException)
    */
   public InputStream getEntityAsStream() throws ODataException {
     try {
-    return (InputStream) getEntity();
+      return (InputStream) getEntity();
     } catch (ClassCastException e) {
       throw new ODataException(e);
     }
   }
-  
+
   /**
    * Close the underlying entity input stream (if such a stream is available) and release all with this repsonse
    * associated resources.

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ODataRequestImpl.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ODataRequestImpl.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ODataRequestImpl.java
index 5a67ae7..67e77b4 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ODataRequestImpl.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ODataRequestImpl.java
@@ -209,17 +209,17 @@ public class ODataRequestImpl extends ODataRequest {
     private static final long serialVersionUID = 1L;
 
     @Override
-    public List<String> put(String key, List<String> value) {
+    public List<String> put(final String key, final List<String> value) {
       return super.put(key.toLowerCase(), value);
     }
 
     // not @Override because that would require the key parameter to be of type Object
-    public List<String> get(String key) {
+    public List<String> get(final String key) {
       return super.get(key.toLowerCase());
     }
 
     @Override
-    public List<String> get(Object key) {
+    public List<String> get(final Object key) {
       String skey = (String) key;
       return super.get(skey.toLowerCase());
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestParser.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestParser.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestParser.java
index ca69d36..6ac1445 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestParser.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestParser.java
@@ -186,8 +186,8 @@ public class BatchRequestParser {
   }
 
   private BatchRequestPart parseBatchRequestPart(final Scanner scanner, final String boundary,
-                                                 final Map<String, String> mimeHeaders,
-                                                 final String contentType) throws BatchException {
+      final Map<String, String> mimeHeaders,
+      final String contentType) throws BatchException {
     if (HttpContentType.APPLICATION_HTTP.equalsIgnoreCase(contentType)) {
       validateEncoding(mimeHeaders.get(BatchHelper.HTTP_CONTENT_TRANSFER_ENCODING.toLowerCase(Locale.ENGLISH)));
       parseNewLine(scanner);// mandatory
@@ -217,8 +217,8 @@ public class BatchRequestParser {
   }
 
   private BatchRequestPart parseBatchRequestPartInChangeset(final Scanner scanner, final String boundary,
-                                                            final Map<String, String> mimeHeaders,
-                                                            final String contentType) throws BatchException {
+      final Map<String, String> mimeHeaders,
+      final String contentType) throws BatchException {
     if (HttpContentType.APPLICATION_HTTP.equalsIgnoreCase(contentType)) {
       validateEncoding(mimeHeaders.get(BatchHelper.HTTP_CONTENT_TRANSFER_ENCODING.toLowerCase(Locale.ENGLISH)));
       parseNewLine(scanner);// mandatory
@@ -231,7 +231,7 @@ public class BatchRequestParser {
   }
 
   private ODataRequest parseRequest(final Scanner scanner, final boolean isChangeSet, final String boundary)
-          throws BatchException {
+      throws BatchException {
     if (scanner.hasNext(REG_EX_REQUEST_LINE)) {
       scanner.next(REG_EX_REQUEST_LINE);
       currentLineNumber++;
@@ -292,11 +292,11 @@ public class BatchRequestParser {
   }
 
   private Map<String, List<String>> parseRequestHeaders(final Scanner scanner, final String boundary)
-          throws BatchException {
+      throws BatchException {
     Map<String, List<String>> headers = new HashMap<String, List<String>>();
     while (scanner.hasNext()
-            && !scanner.hasNext(REG_EX_BLANK_LINE)
-            && !scanner.hasNext("--" + boundary + REG_EX_ZERO_OR_MORE_WHITESPACES)) {
+        && !scanner.hasNext(REG_EX_BLANK_LINE)
+        && !scanner.hasNext("--" + boundary + REG_EX_ZERO_OR_MORE_WHITESPACES)) {
       if (scanner.hasNext(REG_EX_HEADER)) {
         scanner.next(REG_EX_HEADER);
         currentLineNumber++;

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestWriter.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestWriter.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestWriter.java
index 63453c2..a7ddfa1 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestWriter.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchRequestWriter.java
@@ -86,7 +86,7 @@ public class BatchRequestWriter {
     writer.append(HttpHeaders.CONTENT_TYPE).append(COLON).append(SP).append(HttpContentType.APPLICATION_HTTP)
         .append(LF);
     writer.append(BatchHelper.HTTP_CONTENT_TRANSFER_ENCODING).append(COLON).append(SP)
-            .append(BatchHelper.BINARY_ENCODING).append(LF);
+        .append(BatchHelper.BINARY_ENCODING).append(LF);
     if (contentId != null) {
       writer.append(BatchHelper.HTTP_CONTENT_ID).append(COLON).append(SP).append(contentId).append(LF);
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchResponseParser.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchResponseParser.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchResponseParser.java
index 7c2c21b..b488ce2 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchResponseParser.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/BatchResponseParser.java
@@ -361,13 +361,13 @@ public class BatchResponseParser {
   }
 
   private void parseOptionalEmptyLine(final Scanner scanner) {
-      if (scanner.hasNext() && scanner.hasNext(REG_EX_BLANK_LINE)) {
-        scanner.next();
-        currentLineNumber++;
-      }
+    if (scanner.hasNext() && scanner.hasNext(REG_EX_BLANK_LINE)) {
+      scanner.next();
+      currentLineNumber++;
     }
+  }
 
-      private String trimQuota(String boundary) {
+  private String trimQuota(String boundary) {
     if (boundary.matches("\".*\"")) {
       boundary = boundary.replace("\"", "");
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmAssociationImplProv.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmAssociationImplProv.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmAssociationImplProv.java
index 3124d45..8cb8e11 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmAssociationImplProv.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmAssociationImplProv.java
@@ -103,9 +103,9 @@ public class EdmAssociationImplProv extends EdmNamedImplProv implements EdmAssoc
 
   @Override
   public EdmReferentialConstraint getReferentialConstraint() throws EdmException {
-    if(referentialConstraint == null){
+    if (referentialConstraint == null) {
       ReferentialConstraint refConstraint = association.getReferentialConstraint();
-      if(refConstraint != null){
+      if (refConstraint != null) {
         referentialConstraint = new EdmReferentialConstraintImplProv(refConstraint);
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
index 89b7e6e..f2e19ea 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/AtomEntryEntityProducer.java
@@ -145,7 +145,8 @@ public class AtomEntryEntityProducer {
     }
   }
 
-  private void appendAdditinalLinks(XMLStreamWriter writer, EntityInfoAggregator eia, Map<String, Object> data)
+  private void appendAdditinalLinks(final XMLStreamWriter writer, final EntityInfoAggregator eia,
+      final Map<String, Object> data)
       throws EntityProviderException, EdmException, URISyntaxException {
     final Map<String, Map<String, Object>> links = properties.getAdditionalLinks();
     if (links != null && !links.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/servlet/ODataServlet.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/servlet/ODataServlet.java b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/servlet/ODataServlet.java
index a5bedab..5078e4b 100644
--- a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/servlet/ODataServlet.java
+++ b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/servlet/ODataServlet.java
@@ -154,7 +154,8 @@ public class ODataServlet extends HttpServlet {
     return true;
   }
 
-  private void handleRequest(final HttpServletRequest req, final ODataHttpMethod method, final HttpServletResponse resp)
+  private void
+      handleRequest(final HttpServletRequest req, final ODataHttpMethod method, final HttpServletResponse resp)
           throws IOException {
     try {
       if (req.getHeader(HttpHeaders.ACCEPT) != null && req.getHeader(HttpHeaders.ACCEPT).isEmpty()) {
@@ -205,14 +206,14 @@ public class ODataServlet extends HttpServlet {
 
   }
 
-  private String createLocation(HttpServletRequest req) {
+  private String createLocation(final HttpServletRequest req) {
     StringBuilder location = new StringBuilder();
     String contextPath = req.getContextPath();
-    if(contextPath != null) {
+    if (contextPath != null) {
       location.append(contextPath);
     }
     String servletPath = req.getServletPath();
-    if(servletPath != null) {
+    if (servletPath != null) {
       location.append(servletPath);
     }
     location.append("/");

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ODataRequestTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ODataRequestTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ODataRequestTest.java
index 0652a73..673641d 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ODataRequestTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ODataRequestTest.java
@@ -47,7 +47,7 @@ public class ODataRequestTest {
 
   }
 
-  void verifyHeader(ODataRequest r) {
+  void verifyHeader(final ODataRequest r) {
     assertEquals("lower", r.getRequestHeaderValue("lower"));
     assertEquals("lower", r.getRequestHeaderValue("LOWER"));
     assertEquals("lower", r.getRequestHeaderValue("Lower"));
@@ -72,6 +72,6 @@ public class ODataRequestTest {
 
     assertEquals("mIxEd", map.get("mixed").get(0));
     assertEquals("mIxEd", map.get("MIXED").get(0));
-    assertEquals("mIxEd", map.get("mIxEd").get(0));    
+    assertEquals("mIxEd", map.get("mIxEd").get(0));
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestTest.java
index b3f41a0..ca6b655 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestTest.java
@@ -18,16 +18,9 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.core.batch;
 
-import org.apache.olingo.odata2.api.batch.BatchException;
-import org.apache.olingo.odata2.api.batch.BatchRequestPart;
-import org.apache.olingo.odata2.api.client.batch.BatchChangeSet;
-import org.apache.olingo.odata2.api.client.batch.BatchChangeSetPart;
-import org.apache.olingo.odata2.api.client.batch.BatchPart;
-import org.apache.olingo.odata2.api.client.batch.BatchQueryPart;
-import org.apache.olingo.odata2.api.ep.EntityProviderBatchProperties;
-import org.apache.olingo.odata2.core.PathInfoImpl;
-import org.apache.olingo.odata2.testutil.helper.StringHelper;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -38,9 +31,16 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import org.apache.olingo.odata2.api.batch.BatchException;
+import org.apache.olingo.odata2.api.batch.BatchRequestPart;
+import org.apache.olingo.odata2.api.client.batch.BatchChangeSet;
+import org.apache.olingo.odata2.api.client.batch.BatchChangeSetPart;
+import org.apache.olingo.odata2.api.client.batch.BatchPart;
+import org.apache.olingo.odata2.api.client.batch.BatchQueryPart;
+import org.apache.olingo.odata2.api.ep.EntityProviderBatchProperties;
+import org.apache.olingo.odata2.core.PathInfoImpl;
+import org.apache.olingo.odata2.testutil.helper.StringHelper;
+import org.junit.Test;
 
 /**
  * Test creation of a batch request with BatchRequestWriter and

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestWriterTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestWriterTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestWriterTest.java
index 89bdea3..051e1da 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestWriterTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchRequestWriterTest.java
@@ -18,13 +18,9 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.core.batch;
 
-import org.apache.olingo.odata2.api.batch.BatchException;
-import org.apache.olingo.odata2.api.client.batch.BatchChangeSet;
-import org.apache.olingo.odata2.api.client.batch.BatchChangeSetPart;
-import org.apache.olingo.odata2.api.client.batch.BatchPart;
-import org.apache.olingo.odata2.api.client.batch.BatchQueryPart;
-import org.apache.olingo.odata2.testutil.helper.StringHelper;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -33,9 +29,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import org.apache.olingo.odata2.api.batch.BatchException;
+import org.apache.olingo.odata2.api.client.batch.BatchChangeSet;
+import org.apache.olingo.odata2.api.client.batch.BatchChangeSetPart;
+import org.apache.olingo.odata2.api.client.batch.BatchPart;
+import org.apache.olingo.odata2.api.client.batch.BatchQueryPart;
+import org.apache.olingo.odata2.testutil.helper.StringHelper;
+import org.junit.Test;
 
 public class BatchRequestWriterTest {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchResponseTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchResponseTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchResponseTest.java
index c438a0f..f5f05ff 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchResponseTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/batch/BatchResponseTest.java
@@ -18,6 +18,16 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.core.batch;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.olingo.odata2.api.batch.BatchException;
 import org.apache.olingo.odata2.api.batch.BatchResponsePart;
 import org.apache.olingo.odata2.api.client.batch.BatchSingleResponse;
@@ -26,13 +36,6 @@ import org.apache.olingo.odata2.api.processor.ODataResponse;
 import org.apache.olingo.odata2.testutil.helper.StringHelper;
 import org.junit.Test;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
 /**
  * Test creation of a batch response with BatchResponseWriter and
  * then parsing this response again with BatchResponseParser.

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/AbstractProviderTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/AbstractProviderTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/AbstractProviderTest.java
index d9462c2..3c53540 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/AbstractProviderTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/AbstractProviderTest.java
@@ -95,7 +95,7 @@ public abstract class AbstractProviderTest extends AbstractXmlProducerTestHelper
     employeeData.put("EntryDate", date);
     employeeData.put("TeamId", "42");
     employeeData.put("EmployeeName", "Walter Winter");
-    //employeeData.put("getImageType", "abc");
+    // employeeData.put("getImageType", "abc");
 
     Map<String, Object> locationData = new HashMap<String, Object>();
     Map<String, Object> cityData = new HashMap<String, Object>();

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonEntryDeepInsertEntryTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonEntryDeepInsertEntryTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonEntryDeepInsertEntryTest.java
index d35bbe4..e12cb59 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonEntryDeepInsertEntryTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonEntryDeepInsertEntryTest.java
@@ -161,7 +161,7 @@ public class JsonEntryDeepInsertEntryTest extends AbstractConsumerTest {
 
     associationUris = innerRoom.getMetadata().getAssociationUris("nr_Building");
     assertEquals(Collections.emptyList(), associationUris);
-    
+
     assertEquals("W/\"1\"", innerRoom.getMetadata().getEtag());
 
     ODataEntry innerBuilding = (ODataEntry) innerRoomProperties.get("nr_Building");

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java
index dace8eb..ec7ce71 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java
@@ -43,7 +43,7 @@ public class XmlFeedConsumerTest extends AbstractXmlConsumerTest {
   public XmlFeedConsumerTest(final StreamWriterImplType type) {
     super(type);
   }
-  
+
   @Test
   public void roomsFeedWithEtagEntries() throws Exception {
     InputStream stream = getFileAsStream("feed_rooms_small.xml");
@@ -58,13 +58,13 @@ public class XmlFeedConsumerTest extends AbstractXmlConsumerTest {
     FeedMetadata feedMetadata = feed.getFeedMetadata();
     assertNotNull(feedMetadata);
     assertNotNull(feedMetadata.getNextLink());
-    
+
     List<ODataEntry> entries = feed.getEntries();
     assertEquals(3, entries.size());
     ODataEntry singleRoom = entries.get(0);
     EntryMetadata roomMetadata = singleRoom.getMetadata();
     assertNotNull(roomMetadata);
-    
+
     assertEquals("W/\"1\"", roomMetadata.getEtag());
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducerTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducerTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducerTest.java
index f07b56c..7052fb0 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducerTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducerTest.java
@@ -213,7 +213,7 @@ public class JsonEntryEntityProducerTest extends BaseTest {
         EntityProviderWriteProperties.fromProperties(DEFAULT_PROPERTIES).omitJsonWrapper(true).contentOnly(true)
             .expandSelectTree(expandSelectTreeNode).additionalLinks(additinalLinks).build();
     final ODataResponse response = new JsonEntityProvider().writeEntry(entitySet, employeeData, properties);
-   //System.out.println(StringHelper.inputStreamToString((InputStream) response.getEntity()));
+    // System.out.println(StringHelper.inputStreamToString((InputStream) response.getEntity()));
     Map<String, Object> employee =
         (Map<String, Object>) new Gson().fromJson(new InputStreamReader((InputStream) response.getEntity()), Map.class);
     assertNull(employee.get("__metadata"));

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/servlet/ODataServletTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/servlet/ODataServletTest.java b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/servlet/ODataServletTest.java
index 4a6327e..1c74fc0 100644
--- a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/servlet/ODataServletTest.java
+++ b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/servlet/ODataServletTest.java
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License. You may obtain a copy of the License at
- *
+ * 
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,6 +18,13 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.core.servlet;
 
+import java.lang.reflect.Field;
+
+import javax.servlet.GenericServlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.olingo.odata2.api.ODataServiceFactory;
 import org.apache.olingo.odata2.api.commons.HttpHeaders;
 import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
@@ -25,12 +32,6 @@ import org.apache.olingo.odata2.core.rest.ODataServiceFactoryImpl;
 import org.junit.Test;
 import org.mockito.Mockito;
 
-import javax.servlet.GenericServlet;
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.lang.reflect.Field;
-
 /**
  *
  */
@@ -41,9 +42,9 @@ public class ODataServletTest {
   private ServletConfig configMock;
 
   public ODataServletTest() {
-    this.reqMock = Mockito.mock(HttpServletRequest.class);
-    this.respMock = Mockito.mock(HttpServletResponse.class);
-    this.configMock = Mockito.mock(ServletConfig.class);
+    reqMock = Mockito.mock(HttpServletRequest.class);
+    respMock = Mockito.mock(HttpServletResponse.class);
+    configMock = Mockito.mock(ServletConfig.class);
   }
 
   @Test
@@ -90,18 +91,18 @@ public class ODataServletTest {
     Mockito.verify(respMock).setHeader(HttpHeaders.LOCATION, "/");
   }
 
-  private void prepareRequest(HttpServletRequest req, String contextPath, String servletPath) {
+  private void prepareRequest(final HttpServletRequest req, final String contextPath, final String servletPath) {
     Mockito.when(req.getMethod()).thenReturn("GET");
     Mockito.when(req.getContextPath()).thenReturn(contextPath);
     Mockito.when(req.getServletPath()).thenReturn(servletPath);
   }
 
-  private void prepareRequest(HttpServletRequest req) {
+  private void prepareRequest(final HttpServletRequest req) {
     prepareRequest(req, "/context-path", "/servlet-path");
   }
 
-  private void prepareServlet(GenericServlet servlet) throws Exception {
-    //    private transient ServletConfig config;
+  private void prepareServlet(final GenericServlet servlet) throws Exception {
+    // private transient ServletConfig config;
     Field configField = GenericServlet.class.getDeclaredField("config");
     configField.setAccessible(true);
     configField.set(servlet, configMock);
@@ -110,5 +111,4 @@ public class ODataServletTest {
     Mockito.when(configMock.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(factoryClassName);
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/edm/ScenarioEdmProvider.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/edm/ScenarioEdmProvider.java b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/edm/ScenarioEdmProvider.java
index 94f7fea..6585ccb 100644
--- a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/edm/ScenarioEdmProvider.java
+++ b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/edm/ScenarioEdmProvider.java
@@ -216,7 +216,7 @@ public class ScenarioEdmProvider extends EdmProvider {
             .setKey(getKey("EmployeeId"))
             .setNavigationProperties(navigationProperties)
             .setMapping(new Mapping()
-//                  .setMimeType("getImageType")
+                // .setMimeType("getImageType")
 //                .setMediaResourceMimeTypeKey("~mrmtk")
                 .setMediaResourceMimeTypeKey("getImageType"));
 
@@ -269,8 +269,8 @@ public class ScenarioEdmProvider extends EdmProvider {
             .setHasStream(true)
             .setNavigationProperties(navigationProperties)
             .setMapping(new Mapping()
-//            .setMimeType("getImageType")
-            .setMediaResourceMimeTypeKey("getImageType"));
+                // .setMimeType("getImageType")
+                .setMediaResourceMimeTypeKey("getImageType"));
 
       } else if (ENTITY_TYPE_1_5.getName().equals(edmFQName.getName())) {
         List<Property> properties = new ArrayList<Property>();
@@ -321,7 +321,7 @@ public class ScenarioEdmProvider extends EdmProvider {
             .setHasStream(true)
             .setKey(getKey("Id", "Type"))
             .setMapping(new Mapping()
-            //.setMimeType("getType")
+                // .setMimeType("getType")
                 .setMediaResourceMimeTypeKey("getType"));
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/6a866625/odata2-lib/odata-testutil/src/main/java/org/apache/olingo/odata2/testutil/helper/StringHelper.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-testutil/src/main/java/org/apache/olingo/odata2/testutil/helper/StringHelper.java b/odata2-lib/odata-testutil/src/main/java/org/apache/olingo/odata2/testutil/helper/StringHelper.java
index feb4ddd..2ef1c6c 100644
--- a/odata2-lib/odata-testutil/src/main/java/org/apache/olingo/odata2/testutil/helper/StringHelper.java
+++ b/odata2-lib/odata-testutil/src/main/java/org/apache/olingo/odata2/testutil/helper/StringHelper.java
@@ -18,7 +18,13 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.testutil.helper;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.util.Random;
 
@@ -30,15 +36,14 @@ import org.apache.olingo.odata2.testutil.TestUtilRuntimeException;
  */
 public class StringHelper {
 
-
   public static class Stream {
     private final byte[] data;
 
-    private Stream(byte[] data) {
+    private Stream(final byte[] data) {
       this.data = data;
     }
 
-    public Stream(String content, String charset) throws UnsupportedEncodingException {
+    public Stream(final String content, final String charset) throws UnsupportedEncodingException {
       this(content.getBytes(charset));
     }
 
@@ -54,11 +59,11 @@ public class StringHelper {
       return asString("UTF-8");
     }
 
-    public String asString(String charsetName) {
+    public String asString(final String charsetName) {
       return new String(data, Charset.forName(charsetName));
     }
 
-    public Stream print(OutputStream out) throws IOException {
+    public Stream print(final OutputStream out) throws IOException {
       out.write(data);
       return this;
     }
@@ -71,7 +76,7 @@ public class StringHelper {
      * Number of lines separated by line breaks (<code>CRLF</code>).
      * A content string like <code>text\r\nmoreText</code> will result in
      * a line count of <code>2</code>.
-     *
+     * 
      * @return lines count
      */
     public int linesCount() {
@@ -79,7 +84,7 @@ public class StringHelper {
     }
   }
 
-  public static Stream toStream(InputStream stream) throws IOException {
+  public static Stream toStream(final InputStream stream) throws IOException {
     byte[] result = new byte[0];
     byte[] tmp = new byte[8192];
     int readCount = stream.read(tmp);
@@ -94,7 +99,7 @@ public class StringHelper {
     return new Stream(result);
   }
 
-  public static Stream toStream(String content) {
+  public static Stream toStream(final String content) {
     try {
       return new Stream(content, "UTF-8");
     } catch (UnsupportedEncodingException e) {
@@ -102,7 +107,6 @@ public class StringHelper {
     }
   }
 
-
   public static String inputStreamToString(final InputStream in, final boolean preserveLineBreaks) throws IOException {
     final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, Charset.forName("UTF-8")));
     final StringBuilder stringBuilder = new StringBuilder();
@@ -122,12 +126,12 @@ public class StringHelper {
     return result;
   }
 
-  public static int countLines(String content) {
+  public static int countLines(final String content) {
     return countLines(content, "\r\n");
   }
 
-  public static int countLines(String content, String lineBreak) {
-    if(content == null) {
+  public static int countLines(final String content, final String lineBreak) {
+    if (content == null) {
       return -1;
     }
 
@@ -135,7 +139,7 @@ public class StringHelper {
     int count = 1;
 
     while (lastPos >= 0) {
-      lastPos = content.indexOf(lineBreak, lastPos+1);
+      lastPos = content.indexOf(lineBreak, lastPos + 1);
       count++;
     }
     return count;