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 2016/01/25 21:30:48 UTC

[08/51] [abbrv] olingo-odata4 git commit: [OLINGO-841] CleanUp ServerCore

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
index d36221d..906db19 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.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
@@ -59,7 +59,7 @@ public class DebugTabUri implements DebugTab {
 
   private final UriInfo uriInfo;
 
-  public DebugTabUri(UriInfo uriInfo) {
+  public DebugTabUri(final UriInfo uriInfo) {
     this.uriInfo = uriInfo;
   }
 
@@ -69,7 +69,7 @@ public class DebugTabUri implements DebugTab {
   }
 
   @Override
-  public void appendJson(JsonGenerator gen) throws IOException {
+  public void appendJson(final JsonGenerator gen) throws IOException {
     gen.writeStartObject();
 
     if (!uriInfo.getUriResourceParts().isEmpty()) {
@@ -106,10 +106,12 @@ public class DebugTabUri implements DebugTab {
     gen.writeEndObject();
   }
 
-  private void appendCommonJsonObjects(JsonGenerator gen, CountOption countOption, SkipOption skipOption,
-      TopOption topOption, FilterOption filterOption, OrderByOption orderByOption, SelectOption selectOption,
-      ExpandOption expandOption, SearchOption searchOption)
-      throws IOException {
+  private void appendCommonJsonObjects(final JsonGenerator gen, final CountOption countOption,
+      final SkipOption skipOption,
+      final TopOption topOption, final FilterOption filterOption, final OrderByOption orderByOption,
+      final SelectOption selectOption,
+      final ExpandOption expandOption, final SearchOption searchOption)
+          throws IOException {
     if (countOption != null) {
       gen.writeBooleanField("isCount", countOption.getValue());
     }
@@ -152,7 +154,8 @@ public class DebugTabUri implements DebugTab {
     }
   }
 
-  private void appendURIResourceParts(JsonGenerator gen, List<UriResource> uriResourceParts) throws IOException {
+  private void appendURIResourceParts(final JsonGenerator gen, final List<UriResource> uriResourceParts)
+      throws IOException {
     gen.writeStartArray();
     for (UriResource resource : uriResourceParts) {
       gen.writeStartObject();
@@ -171,7 +174,7 @@ public class DebugTabUri implements DebugTab {
     gen.writeEndArray();
   }
 
-  private void appendParameters(JsonGenerator gen, final String name, final List<UriParameter> parameters)
+  private void appendParameters(final JsonGenerator gen, final String name, final List<UriParameter> parameters)
       throws IOException {
     if (!parameters.isEmpty()) {
       Map<String, String> parameterMap = new LinkedHashMap<String, String>();
@@ -184,7 +187,7 @@ public class DebugTabUri implements DebugTab {
     }
   }
 
-  private void appendOrderByItemsJson(JsonGenerator gen, final List<OrderByItem> orders) throws IOException {
+  private void appendOrderByItemsJson(final JsonGenerator gen, final List<OrderByItem> orders) throws IOException {
     gen.writeStartArray();
     for (final OrderByItem item : orders) {
       gen.writeStartObject();
@@ -197,7 +200,8 @@ public class DebugTabUri implements DebugTab {
     gen.writeEndArray();
   }
 
-  private void appendExpandedPropertiesJson(JsonGenerator gen, List<ExpandItem> expandItems) throws IOException {
+  private void appendExpandedPropertiesJson(final JsonGenerator gen, final List<ExpandItem> expandItems)
+      throws IOException {
     gen.writeStartArray();
     for (ExpandItem item : expandItems) {
       appendExpandItemJson(gen, item);
@@ -205,7 +209,7 @@ public class DebugTabUri implements DebugTab {
     gen.writeEndArray();
   }
 
-  private void appendExpandItemJson(JsonGenerator gen, ExpandItem item) throws IOException {
+  private void appendExpandItemJson(final JsonGenerator gen, final ExpandItem item) throws IOException {
     gen.writeStartObject();
 
     if (item.isStar()) {
@@ -237,7 +241,7 @@ public class DebugTabUri implements DebugTab {
     gen.writeEndObject();
   }
 
-  private void appendExpressionJson(JsonGenerator gen, final Expression expression) throws IOException {
+  private void appendExpressionJson(final JsonGenerator gen, final Expression expression) throws IOException {
     if (expression == null) {
       gen.writeNull();
     } else {
@@ -250,7 +254,8 @@ public class DebugTabUri implements DebugTab {
     }
   }
 
-  private void appendSelectedPropertiesJson(JsonGenerator gen, List<SelectItem> selectItems) throws IOException {
+  private void appendSelectedPropertiesJson(final JsonGenerator gen, final List<SelectItem> selectItems)
+      throws IOException {
     gen.writeStartArray();
     for (SelectItem selectItem : selectItems) {
       gen.writeString(getSelectString(selectItem));
@@ -279,7 +284,7 @@ public class DebugTabUri implements DebugTab {
     return selectedProperty;
   }
 
-  private void appendSearchJson(JsonGenerator json, final SearchExpression searchExpression) throws IOException {
+  private void appendSearchJson(final JsonGenerator json, final SearchExpression searchExpression) throws IOException {
     json.writeStartObject();
     if (searchExpression.isSearchTerm()) {
       json.writeStringField("nodeType", "searchTerm");
@@ -306,7 +311,7 @@ public class DebugTabUri implements DebugTab {
     final JsonFactory jsonFactory = new ObjectMapper().getFactory();
 
     writer.append("<h2>Resource Path</h2>\n")
-        .append("<ul>\n<li class=\"json\">");
+    .append("<ul>\n<li class=\"json\">");
     JsonGenerator json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
     appendURIResourceParts(json, uriInfo.getUriResourceParts());
     json.close();
@@ -314,7 +319,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getSearchOption() != null) {
       writer.append("<h2>Search Option</h2>\n")
-          .append("<ul>\n<li class=\"json\">");
+      .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendSearchJson(json, uriInfo.getSearchOption().getSearchExpression());
       json.close();
@@ -323,7 +328,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getFilterOption() != null) {
       writer.append("<h2>Filter Option</h2>\n")
-          .append("<ul>\n<li class=\"json\">");
+      .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendExpressionJson(json, uriInfo.getFilterOption().getExpression());
       json.close();
@@ -332,7 +337,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getOrderByOption() != null) {
       writer.append("<h2>OrderBy Option</h2>\n")
-          .append("<ul>\n<li class=\"json\">");
+      .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendOrderByItemsJson(json, uriInfo.getOrderByOption().getOrders());
       json.close();
@@ -341,7 +346,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getExpandOption() != null) {
       writer.append("<h2>Expand Option</h2>\n")
-          .append("<ul>\n<li class=\"json\">");
+      .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendExpandedPropertiesJson(json, uriInfo.getExpandOption().getExpandItems());
       json.close();
@@ -350,7 +355,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getSelectOption() != null) {
       writer.append("<h2>Selected Properties</h2>\n")
-          .append("<ul>\n");
+      .append("<ul>\n");
       for (final SelectItem selectItem : uriInfo.getSelectOption().getSelectItems()) {
         writer.append("<li>").append(getSelectString(selectItem)).append("</li>\n");
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ExpressionJsonVisitor.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ExpressionJsonVisitor.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ExpressionJsonVisitor.java
index cb87b08..bf37973 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ExpressionJsonVisitor.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ExpressionJsonVisitor.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
@@ -191,7 +191,7 @@ public class ExpressionJsonVisitor implements ExpressionVisitor<JsonNode> {
 
   @Override
   public JsonNode visitEnum(final EdmEnumType type, final List<String> enumValues) throws ExpressionVisitException,
-      ODataApplicationException {
+  ODataApplicationException {
     ObjectNode result = nodeFactory.objectNode()
         .put(NODE_TYPE_NAME, ENUM_NAME)
         .put(TYPE_NAME, getTypeString(type));
@@ -266,7 +266,7 @@ public class ExpressionJsonVisitor implements ExpressionVisitor<JsonNode> {
     }
   }
 
-  private String getType(BinaryOperatorKind operator) {
+  private String getType(final BinaryOperatorKind operator) {
     switch (operator) {
     case MUL:
     case DIV:
@@ -302,8 +302,8 @@ public class ExpressionJsonVisitor implements ExpressionVisitor<JsonNode> {
     final UriResource lastSegment = uriResourceParts.get(uriResourceParts.size() - 1);
     final EdmType type = lastSegment instanceof UriResourcePartTyped ?
         ((UriResourcePartTyped) lastSegment).getType() :
-        null;
-    return type == null ? UNKNOWN_NAME : type.getFullQualifiedName().getFullQualifiedNameAsString();
+          null;
+        return type == null ? UNKNOWN_NAME : type.getFullQualifiedName().getFullQualifiedNameAsString();
   }
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ServerCoreDebugger.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ServerCoreDebugger.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ServerCoreDebugger.java
index 0ca965f..6aef2fb 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ServerCoreDebugger.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/ServerCoreDebugger.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
@@ -46,11 +46,11 @@ public class ServerCoreDebugger {
   private DebugSupport debugSupport;
   private String debugFormat;
 
-  public ServerCoreDebugger(OData odata) {
+  public ServerCoreDebugger(final OData odata) {
     this.odata = odata;
   }
 
-  public void resolveDebugMode(HttpServletRequest request) {
+  public void resolveDebugMode(final HttpServletRequest request) {
     if (debugSupport != null) {
       // Should we read the parameter from the servlet here and ignore multiple parameters?
       debugFormat = request.getParameter(DebugSupport.ODATA_DEBUG_QUERY_PARAMETER);
@@ -63,7 +63,7 @@ public class ServerCoreDebugger {
 
   public ODataResponse createDebugResponse(final ODataRequest request, final ODataResponse response,
       final Exception exception, final UriInfo uriInfo, final Map<String, String> serverEnvironmentVariables) {
-    //Failsafe so we do not generate unauthorized debug messages
+    // Failsafe so we do not generate unauthorized debug messages
     if (!isDebugMode) {
       return response;
     }
@@ -129,7 +129,7 @@ public class ServerCoreDebugger {
     }
   }
 
-  public void setDebugSupportProcessor(DebugSupport debugSupport) {
+  public void setDebugSupportProcessor(final DebugSupport debugSupport) {
     this.debugSupport = debugSupport;
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/DeserializerResultImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/DeserializerResultImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/DeserializerResultImpl.java
index 4ea30ad..01642c3 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/DeserializerResultImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/DeserializerResultImpl.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/FixedFormatDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/FixedFormatDeserializerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/FixedFormatDeserializerImpl.java
index df6b4cc..bc77e66 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/FixedFormatDeserializerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/FixedFormatDeserializerImpl.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
@@ -62,7 +62,7 @@ public class FixedFormatDeserializerImpl implements FixedFormatDeserializer {
   }
 
   @Override
-  public Object primitiveValue(InputStream content, final EdmProperty property) throws DeserializerException {
+  public Object primitiveValue(final InputStream content, final EdmProperty property) throws DeserializerException {
     if (property == null || !property.isPrimitive()) {
       throw new DeserializerException("Wrong property.", DeserializerException.MessageKeys.NOT_IMPLEMENTED);
     }
@@ -103,7 +103,7 @@ public class FixedFormatDeserializerImpl implements FixedFormatDeserializer {
                 parameter.isNullable(), parameter.getMaxLength(), parameter.getPrecision(), parameter.getScale(), true,
                 parameter.getMapping() == null ?
                     primitiveType.getDefaultType() :
-                    parameter.getMapping().getMappedJavaClass()));
+                      parameter.getMapping().getMappedJavaClass()));
       } catch (final EdmPrimitiveTypeException e) {
         throw new DeserializerException(
             "Invalid value '" + content + "' for parameter " + parameter.getName(), e,
@@ -119,7 +119,7 @@ public class FixedFormatDeserializerImpl implements FixedFormatDeserializer {
   @Override
   public List<BatchRequestPart> parseBatchRequest(final InputStream content, final String boundary,
       final BatchOptions options)
-      throws BatchDeserializerException {
+          throws BatchDeserializerException {
     final BatchParser parser = new BatchParser();
 
     return parser.parseBatchRequest(content, boundary, options);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchBodyPart.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchBodyPart.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchBodyPart.java
index 6c88da2..7cb031e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchBodyPart.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchBodyPart.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
@@ -72,7 +72,7 @@ public class BatchBodyPart implements BatchPart {
     return isChangeSet ? consumeChangeSet(remainingMessage) : consumeQueryOperation(remainingMessage);
   }
 
-  private List<BatchQueryOperation> consumeChangeSet(List<Line> remainingMessage)
+  private List<BatchQueryOperation> consumeChangeSet(final List<Line> remainingMessage)
       throws BatchDeserializerException {
     final List<List<Line>> changeRequests = splitChangeSet(remainingMessage);
     final List<BatchQueryOperation> requestList = new LinkedList<BatchQueryOperation>();
@@ -84,7 +84,7 @@ public class BatchBodyPart implements BatchPart {
     return requestList;
   }
 
-  private List<List<Line>> splitChangeSet(List<Line> remainingMessage) throws BatchDeserializerException {
+  private List<List<Line>> splitChangeSet(final List<Line> remainingMessage) throws BatchDeserializerException {
 
     final HeaderField contentTypeField = headers.getHeaderField(HttpHeader.CONTENT_TYPE);
     final String changeSetBoundary = BatchParserCommon.getBoundary(contentTypeField.getValue(),

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchChangeSetPart.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchChangeSetPart.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchChangeSetPart.java
index 3c596fd..526880a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchChangeSetPart.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchChangeSetPart.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchLineReader.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchLineReader.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchLineReader.java
index c0a1e20..1a79985 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchLineReader.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchLineReader.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,9 +18,6 @@
  */
 package org.apache.olingo.server.core.deserializer.batch;
 
-import org.apache.olingo.commons.api.format.ContentType;
-import org.apache.olingo.commons.api.http.HttpHeader;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
@@ -28,6 +25,9 @@ import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.olingo.commons.api.format.ContentType;
+import org.apache.olingo.commons.api.http.HttpHeader;
+
 public class BatchLineReader {
   private static final byte CR = '\r';
   private static final byte LF = '\n';
@@ -66,7 +66,7 @@ public class BatchLineReader {
   public List<String> toList() throws IOException {
     final List<String> result = new ArrayList<String>();
     String currentLine = readLine();
-    if(currentLine != null) {
+    if (currentLine != null) {
       currentBoundary = currentLine.trim();
       result.add(currentLine);
 
@@ -80,7 +80,7 @@ public class BatchLineReader {
   public List<Line> toLineList() throws IOException {
     final List<Line> result = new ArrayList<Line>();
     String currentLine = readLine();
-    if(currentLine != null) {
+    if (currentLine != null) {
       currentBoundary = currentLine.trim();
       int counter = 1;
       result.add(new Line(currentLine, counter++));
@@ -93,9 +93,9 @@ public class BatchLineReader {
     return result;
   }
 
-  private void updateCurrentCharset(String currentLine) {
-    if(currentLine != null) {
-      if(currentLine.startsWith(HttpHeader.CONTENT_TYPE)) {
+  private void updateCurrentCharset(final String currentLine) {
+    if (currentLine != null) {
+      if (currentLine.startsWith(HttpHeader.CONTENT_TYPE)) {
         String clValue = currentLine.substring(13, currentLine.length() - 2).trim();
         ContentType ct = ContentType.parse(clValue);
         if (ct != null) {
@@ -111,18 +111,18 @@ public class BatchLineReader {
             currentBoundary = DOUBLE_DASH + boundary;
           }
         }
-      } else if(CRLF.equals(currentLine)) {
+      } else if (CRLF.equals(currentLine)) {
         readState.foundLinebreak();
-      } else if(isBoundary(currentLine)) {
+      } else if (isBoundary(currentLine)) {
         readState.foundBoundary();
       }
     }
   }
 
-  private boolean isBoundary(String currentLine) {
-    if((currentBoundary + CRLF).equals(currentLine)) {
+  private boolean isBoundary(final String currentLine) {
+    if ((currentBoundary + CRLF).equals(currentLine)) {
       return true;
-    } else if((currentBoundary + DOUBLE_DASH + CRLF).equals(currentLine)) {
+    } else if ((currentBoundary + DOUBLE_DASH + CRLF).equals(currentLine)) {
       return true;
     }
     return false;
@@ -145,10 +145,10 @@ public class BatchLineReader {
       }
 
       if (!foundLineEnd) {
-        byte currentChar = this.buffer[offset++];
-        if(!innerBuffer.hasRemaining()) {
+        byte currentChar = buffer[offset++];
+        if (!innerBuffer.hasRemaining()) {
           innerBuffer.flip();
-          ByteBuffer tmp = ByteBuffer.allocate(innerBuffer.limit() *2);
+          ByteBuffer tmp = ByteBuffer.allocate(innerBuffer.limit() * 2);
           tmp.put(innerBuffer);
           innerBuffer = tmp;
         }
@@ -166,7 +166,7 @@ public class BatchLineReader {
           }
 
           // Check if there is at least one character
-          if (limit != EOF && this.buffer[offset] == LF) {
+          if (limit != EOF && buffer[offset] == LF) {
             innerBuffer.put(LF);
             offset++;
           }
@@ -174,11 +174,11 @@ public class BatchLineReader {
       }
     }
 
-    if(innerBuffer.position() == 0) {
+    if (innerBuffer.position() == 0) {
       return null;
     } else {
       String currentLine;
-      if(readState.isReadBody()) {
+      if (readState.isReadBody()) {
         currentLine = new String(innerBuffer.array(), 0, innerBuffer.position(), getCurrentCharset());
       } else {
         currentLine = new String(innerBuffer.array(), 0, innerBuffer.position(), CS_ISO_8859_1);
@@ -208,9 +208,11 @@ public class BatchLineReader {
     public void foundLinebreak() {
       state++;
     }
+
     public void foundBoundary() {
       state = 0;
     }
+
     public boolean isReadBody() {
       return state >= 2;
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
index 243cbe0..c6c4c49 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.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
@@ -34,7 +34,7 @@ public class BatchParser {
 
   public List<BatchRequestPart> parseBatchRequest(final InputStream content, final String boundary,
       final BatchOptions options)
-          throws BatchDeserializerException {
+      throws BatchDeserializerException {
     this.options = options;
 
     BatchRequestTransformator transformator = new BatchRequestTransformator(options.getRawBaseUri(),
@@ -44,7 +44,7 @@ public class BatchParser {
 
   private List<BatchRequestPart> parse(final InputStream in, final String boundary,
       final BatchRequestTransformator transformator)
-      throws BatchDeserializerException {
+          throws BatchDeserializerException {
     try {
       return parseBatch(in, boundary, transformator);
     } catch (IOException e) {
@@ -72,7 +72,7 @@ public class BatchParser {
   }
 
   private List<List<Line>> splitBodyParts(final InputStream in, final String boundary) throws IOException,
-      BatchDeserializerException {
+  BatchDeserializerException {
     final BatchLineReader reader = new BatchLineReader(in);
     final List<Line> message = reader.toLineList();
     reader.close();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParserCommon.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParserCommon.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParserCommon.java
index bdb8195..055a56d 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParserCommon.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParserCommon.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
@@ -35,7 +35,7 @@ public class BatchParserCommon {
 
   private static final String PATTERN_BOUNDARY =
       "([a-zA-Z0-9_\\-\\.'\\+]{1,70})|"
-      + "\"([a-zA-Z0-9_\\-\\.'\\+\\s\\(\\),/:=\\?]{1,69}[a-zA-Z0-9_\\-\\.'\\+\\(\\),/:=\\?])\"";
+          + "\"([a-zA-Z0-9_\\-\\.'\\+\\s\\(\\),/:=\\?]{1,69}[a-zA-Z0-9_\\-\\.'\\+\\(\\),/:=\\?])\"";
   private static final Pattern PATTERN_LAST_CRLF = Pattern.compile("(.*)\\r\\n\\s*", Pattern.DOTALL);
   private static final Pattern PATTERN_HEADER_LINE = Pattern.compile("([a-zA-Z\\-]+):\\s?(.*)\\s*");
 
@@ -147,7 +147,7 @@ public class BatchParserCommon {
     return messageParts;
   }
 
-  private static void removeEndingCRLFFromList(List<Line> list) {
+  private static void removeEndingCRLFFromList(final List<Line> list) {
     if (list.size() > 0) {
       Line lastLine = list.remove(list.size() - 1);
       list.add(removeEndingCRLF(lastLine));
@@ -163,7 +163,7 @@ public class BatchParserCommon {
     }
   }
 
-  public static Header consumeHeaders(List<Line> remainingMessage) {
+  public static Header consumeHeaders(final List<Line> remainingMessage) {
     final int headerLineNumber = remainingMessage.size() != 0 ? remainingMessage.get(0).getLineNumber() : 0;
     final Header headers = new Header(headerLineNumber);
     final Iterator<Line> iter = remainingMessage.iterator();
@@ -189,7 +189,7 @@ public class BatchParserCommon {
     return headers;
   }
 
-  public static void consumeBlankLine(List<Line> remainingMessage, final boolean isStrict)
+  public static void consumeBlankLine(final List<Line> remainingMessage, final boolean isStrict)
       throws BatchDeserializerException {
     if (remainingMessage.size() > 0 && remainingMessage.get(0).toString().matches("\\s*\r?\n\\s*")) {
       remainingMessage.remove(0);
@@ -226,7 +226,7 @@ public class BatchParserCommon {
   }
 
   public static InputStream convertLineListToInputStream(final List<Line> list, final Charset charset,
-                                                         final int length) {
+      final int length) {
     final String message = trimLineListToLength(list, length);
 
     return new ByteArrayInputStream(message.getBytes(charset));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchPart.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchPart.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchPart.java
index 13986c4..da969da 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchPart.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchPart.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchQueryOperation.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchQueryOperation.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchQueryOperation.java
index 8bbcb81..ba32ced 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchQueryOperation.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchQueryOperation.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchRequestTransformator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchRequestTransformator.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchRequestTransformator.java
index 20ef8ea..b9174c9 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchRequestTransformator.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchRequestTransformator.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
@@ -30,8 +30,8 @@ import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.apache.olingo.server.api.ODataRequest;
 import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException;
-import org.apache.olingo.server.api.deserializer.batch.BatchRequestPart;
 import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException.MessageKeys;
+import org.apache.olingo.server.api.deserializer.batch.BatchRequestPart;
 
 public class BatchRequestTransformator {
   private static final Charset DEFAULT_CHARSET = Charset.forName("utf-8");
@@ -100,7 +100,7 @@ public class BatchRequestTransformator {
 
   private ODataRequest createRequest(final BatchQueryOperation operation, final String baseUri,
       final boolean isChangeSet)
-      throws BatchDeserializerException {
+          throws BatchDeserializerException {
     final HttpRequestStatusLine statusLine =
         new HttpRequestStatusLine(operation.getHttpStatusLine(), baseUri, rawServiceResolutionUri);
     statusLine.validateHttpMethod(isChangeSet);
@@ -127,13 +127,13 @@ public class BatchRequestTransformator {
     return request;
   }
 
-  private Charset getCharset(BatchQueryOperation operation) {
+  private Charset getCharset(final BatchQueryOperation operation) {
     String ct = operation.getHeaders().getHeader(HttpHeader.CONTENT_TYPE);
-    if(ct != null) {
+    if (ct != null) {
       ContentType contentType = ContentType.parse(ct);
-      if(contentType != null) {
+      if (contentType != null) {
         String charsetValue = contentType.getParameter(ContentType.PARAMETER_CHARSET);
-        if(charsetValue != null) {
+        if (charsetValue != null) {
           return Charset.forName(charsetValue);
         }
       }
@@ -153,8 +153,8 @@ public class BatchRequestTransformator {
   }
 
   private InputStream getBodyStream(final BatchQueryOperation operation, final HttpRequestStatusLine statusLine,
-                                    final Charset charset)
-      throws BatchDeserializerException {
+      final Charset charset)
+          throws BatchDeserializerException {
     if (statusLine.getMethod().equals(HttpMethod.GET)) {
       return new ByteArrayInputStream(new byte[0]);
     } else {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchTransformatorCommon.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchTransformatorCommon.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchTransformatorCommon.java
index 2f3d8bb..d319f86 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchTransformatorCommon.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchTransformatorCommon.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
@@ -26,9 +26,9 @@ import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerExceptio
 import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException.MessageKeys;
 
 public class BatchTransformatorCommon {
-  
+
   private BatchTransformatorCommon() {
-    //Private Utility Constructor
+    // Private Utility Constructor
   }
 
   public static void validateContentType(final Header headers, final ContentType expected)

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Header.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Header.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Header.java
index 1391f94..66372ab 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Header.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Header.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HeaderField.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HeaderField.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HeaderField.java
index fc0e156..9ad3343 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HeaderField.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HeaderField.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.java
index f2d006a..1600ee6 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.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
@@ -143,7 +143,7 @@ public class HttpRequestStatusLine {
   }
 
   public void validateHttpMethod(final boolean isChangeSet) throws BatchDeserializerException {
-    if(isChangeSet && !HTTP_CHANGE_SET_METHODS.contains(getMethod().toString())) {
+    if (isChangeSet && !HTTP_CHANGE_SET_METHODS.contains(getMethod().toString())) {
       throw new BatchDeserializerException("Invalid change set method", MessageKeys.INVALID_CHANGESET_METHOD,
           Integer.toString(statusLine.getLineNumber()));
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Line.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Line.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Line.java
index 6485a49..3417670 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Line.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/Line.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilder.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilder.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilder.java
index 549cf33..640100b 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilder.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilder.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilderImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilderImpl.java
index f154074..b0287ff 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilderImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/helper/ExpandTreeBuilderImpl.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
index 9639b3d..7bbc4a0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.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
@@ -93,7 +93,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private EntityCollection consumeEntityCollectionNode(final EdmEntityType edmEntityType, ObjectNode tree,
+  private EntityCollection consumeEntityCollectionNode(final EdmEntityType edmEntityType, final ObjectNode tree,
       final ExpandTreeBuilder expandBuilder) throws DeserializerException {
     EntityCollection entitySet = new EntityCollection();
 
@@ -185,7 +185,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private ObjectNode parseJsonTree(InputStream stream) throws IOException, DeserializerException {
+  private ObjectNode parseJsonTree(final InputStream stream) throws IOException, DeserializerException {
     ObjectMapper objectMapper = new ObjectMapper();
     objectMapper.configure(DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY, true);
     JsonParser parser = new JsonFactory(objectMapper).createParser(stream);
@@ -227,7 +227,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     return parameters;
   }
 
-  private Parameter createParameter(JsonNode node, final String paramName, final EdmParameter edmParameter)
+  private Parameter createParameter(final JsonNode node, final String paramName, final EdmParameter edmParameter)
       throws DeserializerException {
     Parameter parameter = new Parameter();
     parameter.setName(paramName);
@@ -265,8 +265,8 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   public Parameter parameter(final String content, final EdmParameter parameter) throws DeserializerException {
     try {
       JsonParser parser = new JsonFactory(new ObjectMapper()
-          .configure(DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY, true))
-          .createParser(content);
+      .configure(DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY, true))
+      .createParser(content);
       JsonNode node = parser.getCodec().readTree(parser);
       if (node == null) {
         throw new DeserializerException("Invalid JSON syntax.",
@@ -356,8 +356,8 @@ public class ODataJsonDeserializer implements ODataDeserializer {
    * @param edmNavigationProperty related navigation property
    * @throws DeserializerException if jsonNode is not null or if null but nullable or collection navigationProperty
    */
-  private void checkNotNullOrValidNull(JsonNode jsonNode,
-      EdmNavigationProperty edmNavigationProperty) throws DeserializerException {
+  private void checkNotNullOrValidNull(final JsonNode jsonNode,
+      final EdmNavigationProperty edmNavigationProperty) throws DeserializerException {
     boolean isNullable = edmNavigationProperty.isNullable();
     if ((jsonNode.isNull() && !isNullable) || (jsonNode.isNull() && edmNavigationProperty.isCollection())) {
       throw new DeserializerException("Property: " + edmNavigationProperty.getName() + " must not be null.",
@@ -365,32 +365,33 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private Link createLink(ExpandTreeBuilder expandBuilder, String navigationPropertyName, JsonNode jsonNode,
-      EdmNavigationProperty edmNavigationProperty) throws DeserializerException {
+  private Link createLink(final ExpandTreeBuilder expandBuilder, final String navigationPropertyName,
+      final JsonNode jsonNode,
+      final EdmNavigationProperty edmNavigationProperty) throws DeserializerException {
     Link link = new Link();
     link.setTitle(navigationPropertyName);
     final ExpandTreeBuilder childExpandBuilder = (expandBuilder != null) ?
         expandBuilder.expand(edmNavigationProperty) : null;
-    if (jsonNode.isArray() && edmNavigationProperty.isCollection()) {
-      link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
-      EntityCollection inlineEntitySet = new EntityCollection();
-      inlineEntitySet.getEntities().addAll(
-          consumeEntitySetArray(edmNavigationProperty.getType(), jsonNode, childExpandBuilder));
-      link.setInlineEntitySet(inlineEntitySet);
-    } else if (!jsonNode.isArray() && (!jsonNode.isValueNode() || jsonNode.isNull())
-        && !edmNavigationProperty.isCollection()) {
-      link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
-      if (!jsonNode.isNull()) {
-        Entity inlineEntity = consumeEntityNode(edmNavigationProperty.getType(), (ObjectNode) jsonNode,
-            childExpandBuilder);
-        link.setInlineEntity(inlineEntity);
-      }
-    } else {
-      throw new DeserializerException("Invalid value: " + jsonNode.getNodeType()
-          + " for expanded navigation property: " + navigationPropertyName,
-          MessageKeys.INVALID_VALUE_FOR_NAVIGATION_PROPERTY, navigationPropertyName);
-    }
-    return link;
+        if (jsonNode.isArray() && edmNavigationProperty.isCollection()) {
+          link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
+          EntityCollection inlineEntitySet = new EntityCollection();
+          inlineEntitySet.getEntities().addAll(
+              consumeEntitySetArray(edmNavigationProperty.getType(), jsonNode, childExpandBuilder));
+          link.setInlineEntitySet(inlineEntitySet);
+        } else if (!jsonNode.isArray() && (!jsonNode.isValueNode() || jsonNode.isNull())
+            && !edmNavigationProperty.isCollection()) {
+          link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
+          if (!jsonNode.isNull()) {
+            Entity inlineEntity = consumeEntityNode(edmNavigationProperty.getType(), (ObjectNode) jsonNode,
+                childExpandBuilder);
+            link.setInlineEntity(inlineEntity);
+          }
+        } else {
+          throw new DeserializerException("Invalid value: " + jsonNode.getNodeType()
+              + " for expanded navigation property: " + navigationPropertyName,
+              MessageKeys.INVALID_VALUE_FOR_NAVIGATION_PROPERTY, navigationPropertyName);
+        }
+        return link;
   }
 
   private Link consumeBindingLink(final String key, final JsonNode jsonNode, final EdmEntityType edmEntityType)
@@ -460,7 +461,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   private void consumePropertySingleNode(final String name, final EdmType type,
       final boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale,
       final boolean isUnicode, final EdmMapping mapping, final JsonNode jsonNode, final Property property)
-      throws DeserializerException {
+          throws DeserializerException {
     switch (type.getKind()) {
     case PRIMITIVE:
     case DEFINITION:
@@ -482,7 +483,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
 
   private Object readComplexNode(final String name, final EdmType type, final boolean isNullable,
       final JsonNode jsonNode)
-      throws DeserializerException {
+          throws DeserializerException {
     // read and add all complex properties
     ComplexValue value = readComplexValue(name, type, isNullable, jsonNode);
 
@@ -498,7 +499,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   private void consumePropertyCollectionNode(final String name, final EdmType type,
       final boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale,
       final boolean isUnicode, final EdmMapping mapping, final JsonNode jsonNode, final Property property)
-      throws DeserializerException {
+          throws DeserializerException {
     if (!jsonNode.isArray()) {
       throw new DeserializerException("Value for property: " + name + " must be an array but is not.",
           DeserializerException.MessageKeys.INVALID_JSON_TYPE_FOR_PROPERTY, name);
@@ -516,9 +517,9 @@ public class ODataJsonDeserializer implements ODataDeserializer {
         valueArray.add(value);
       }
       property.setValue(type.getKind() == EdmTypeKind.ENUM ?
-              ValueType.COLLECTION_ENUM :
-              ValueType.COLLECTION_PRIMITIVE,
-          valueArray);
+          ValueType.COLLECTION_ENUM :
+          ValueType.COLLECTION_PRIMITIVE,
+            valueArray);
       break;
     case COMPLEX:
       while (iterator.hasNext()) {
@@ -611,12 +612,12 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     final EdmPrimitiveType edmPrimitiveType =
         type.getKind() == EdmTypeKind.ENUM ?
             ((EdmEnumType) type).getUnderlyingType() :
-                type.getKind() == EdmTypeKind.DEFINITION ?
-                    ((EdmTypeDefinition) type).getUnderlyingType() :
-                    type;
-    return mapping == null || mapping.getMappedJavaClass() == null ?
-        edmPrimitiveType.getDefaultType() :
-        mapping.getMappedJavaClass();
+            type.getKind() == EdmTypeKind.DEFINITION ?
+                ((EdmTypeDefinition) type).getUnderlyingType() :
+                type;
+                  return mapping == null || mapping.getMappedJavaClass() == null ?
+                      edmPrimitiveType.getDefaultType() :
+                        mapping.getMappedJavaClass();
   }
 
   /**
@@ -633,7 +634,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private void removeAnnotations(ObjectNode tree) throws DeserializerException {
+  private void removeAnnotations(final ObjectNode tree) throws DeserializerException {
     List<String> toRemove = new ArrayList<String>();
     Iterator<Entry<String, JsonNode>> fieldsIterator = tree.fields();
     while (fieldsIterator.hasNext()) {
@@ -705,23 +706,23 @@ public class ODataJsonDeserializer implements ODataDeserializer {
 
   private boolean matchNumberCase(final JsonNode node, final EdmPrimitiveTypeKind primKind) {
     return node.isNumber() &&
-      (primKind == EdmPrimitiveTypeKind.Int16
-      || primKind == EdmPrimitiveTypeKind.Int32
-      || primKind == EdmPrimitiveTypeKind.Byte
-      || primKind == EdmPrimitiveTypeKind.SByte
-      || primKind == EdmPrimitiveTypeKind.Single
-      || primKind == EdmPrimitiveTypeKind.Double);
+        (primKind == EdmPrimitiveTypeKind.Int16
+            || primKind == EdmPrimitiveTypeKind.Int32
+            || primKind == EdmPrimitiveTypeKind.Byte
+            || primKind == EdmPrimitiveTypeKind.SByte
+            || primKind == EdmPrimitiveTypeKind.Single
+            || primKind == EdmPrimitiveTypeKind.Double);
   }
 
   private boolean matchTextualCase(final JsonNode node, final EdmPrimitiveTypeKind primKind) {
     return node.isTextual() &&
         (primKind == EdmPrimitiveTypeKind.String
-        || primKind == EdmPrimitiveTypeKind.Binary
-        || primKind == EdmPrimitiveTypeKind.Date
-        || primKind == EdmPrimitiveTypeKind.DateTimeOffset
-        || primKind == EdmPrimitiveTypeKind.Duration
-        || primKind == EdmPrimitiveTypeKind.Guid
-        || primKind == EdmPrimitiveTypeKind.TimeOfDay);
+            || primKind == EdmPrimitiveTypeKind.Binary
+            || primKind == EdmPrimitiveTypeKind.Date
+            || primKind == EdmPrimitiveTypeKind.DateTimeOffset
+            || primKind == EdmPrimitiveTypeKind.Duration
+            || primKind == EdmPrimitiveTypeKind.Guid
+            || primKind == EdmPrimitiveTypeKind.TimeOfDay);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
index eb1f5de..d3876b6 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.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
@@ -115,7 +115,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     return value;
   }
 
-  private Object complex(final XMLEventReader reader, final StartElement start, EdmComplexType edmComplex)
+  private Object complex(final XMLEventReader reader, final StartElement start, final EdmComplexType edmComplex)
       throws XMLStreamException, EdmPrimitiveTypeException, DeserializerException {
     ComplexValue value = new ComplexValue();
     boolean foundEndProperty = false;
@@ -165,7 +165,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   private Property property(final XMLEventReader reader, final StartElement start, final EdmType edmType,
       final boolean isNullable, final Integer maxLength, final Integer precision,
       final Integer scale, final boolean isUnicode, final boolean isCollection)
-      throws XMLStreamException, EdmPrimitiveTypeException, DeserializerException {
+          throws XMLStreamException, EdmPrimitiveTypeException, DeserializerException {
 
     final Property property = new Property();
 
@@ -182,7 +182,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     return property;
   }
 
-  private ValueType getValueType(EdmType edmType, boolean isCollection) {
+  private ValueType getValueType(final EdmType edmType, final boolean isCollection) {
     if (edmType instanceof EdmPrimitiveType) {
       if (edmType instanceof EdmEnumType) {
         return isCollection ? ValueType.COLLECTION_ENUM : ValueType.ENUM;
@@ -231,7 +231,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult property(InputStream input, EdmProperty edmProperty)
+  public DeserializerResult property(final InputStream input, final EdmProperty edmProperty)
       throws DeserializerException {
     try {
       final XMLEventReader reader = getReader(input);
@@ -342,7 +342,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     }
   }
 
-  private List<String> entityRefCollection(XMLEventReader reader, StartElement start)
+  private List<String> entityRefCollection(final XMLEventReader reader, final StartElement start)
       throws XMLStreamException {
     boolean foundEndElement = false;
     ArrayList<String> references = new ArrayList<String>();
@@ -360,7 +360,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     return references;
   }
 
-  private String entityRef(XMLEventReader reader, StartElement start) throws XMLStreamException {
+  private String entityRef(final XMLEventReader reader, final StartElement start) throws XMLStreamException {
     boolean foundEndElement = false;
     final Attribute entityRefId = start.getAttributeByName(Constants.QNAME_ATOM_ATTR_ID);
     while (reader.hasNext() && !foundEndElement) {
@@ -388,7 +388,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
 
   private void properties(final XMLEventReader reader, final StartElement start, final Entity entity,
       final EdmEntityType edmEntityType)
-      throws XMLStreamException, EdmPrimitiveTypeException, DeserializerException {
+          throws XMLStreamException, EdmPrimitiveTypeException, DeserializerException {
 
     boolean foundEndProperties = false;
     while (reader.hasNext() && !foundEndProperties) {
@@ -547,7 +547,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult entity(InputStream input, EdmEntityType edmEntityType)
+  public DeserializerResult entity(final InputStream input, final EdmEntityType edmEntityType)
       throws DeserializerException {
     try {
       final XMLEventReader reader = getReader(input);
@@ -633,7 +633,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult entityCollection(InputStream input, EdmEntityType edmEntityType)
+  public DeserializerResult entityCollection(final InputStream input, final EdmEntityType edmEntityType)
       throws DeserializerException {
     try {
       final XMLEventReader reader = getReader(input);
@@ -654,7 +654,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult entityReferences(InputStream stream) throws DeserializerException {
+  public DeserializerResult entityReferences(final InputStream stream) throws DeserializerException {
     try {
       XMLEventReader reader = getReader(stream);
       ArrayList<URI> references = new ArrayList<URI>();
@@ -677,7 +677,7 @@ public class ODataXmlDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult actionParameters(InputStream stream, EdmAction edmAction)
+  public DeserializerResult actionParameters(final InputStream stream, final EdmAction edmAction)
       throws DeserializerException {
     Map<String, Parameter> parameters = new LinkedHashMap<String, Parameter>();
     if (edmAction.getParameterNames() == null || edmAction.getParameterNames().isEmpty()
@@ -724,8 +724,8 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     }
   }
 
-  private void consumeParameters(EdmAction edmAction, XMLEventReader reader,
-      StartElement start, Map<String, Parameter> parameters) throws DeserializerException,
+  private void consumeParameters(final EdmAction edmAction, final XMLEventReader reader,
+      final StartElement start, final Map<String, Parameter> parameters) throws DeserializerException,
       EdmPrimitiveTypeException, XMLStreamException {
 
     List<String> parameterNames = edmAction.getParameterNames();
@@ -763,8 +763,8 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     }
   }
 
-  private Parameter createParameter(XMLEventReader reader, StartElement start, String paramName,
-      EdmParameter edmParameter) throws DeserializerException, EdmPrimitiveTypeException, XMLStreamException {
+  private Parameter createParameter(final XMLEventReader reader, final StartElement start, final String paramName,
+      final EdmParameter edmParameter) throws DeserializerException, EdmPrimitiveTypeException, XMLStreamException {
 
     Parameter parameter = new Parameter();
     parameter.setName(paramName);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagHelperImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagHelperImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagHelperImpl.java
index 81cefe3..168541f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagHelperImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagHelperImpl.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
@@ -29,7 +29,7 @@ public class ETagHelperImpl implements ETagHelper {
   @Override
   public boolean checkReadPreconditions(final String eTag,
       final Collection<String> ifMatchHeaders, final Collection<String> ifNoneMatchHeaders)
-      throws PreconditionException {
+          throws PreconditionException {
     if (eTag != null) {
       final ETagInformation ifMatch = createETagInformation(ifMatchHeaders);
       if (!ifMatch.isMatchedBy(eTag) && !ifMatch.getETags().isEmpty()) {
@@ -44,7 +44,7 @@ public class ETagHelperImpl implements ETagHelper {
   @Override
   public void checkChangePreconditions(final String eTag,
       final Collection<String> ifMatchHeaders, final Collection<String> ifNoneMatchHeaders)
-      throws PreconditionException {
+          throws PreconditionException {
     if (eTag != null) {
       final ETagInformation ifMatch = createETagInformation(ifMatchHeaders);
       final ETagInformation ifNoneMatch = createETagInformation(ifNoneMatchHeaders);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagInformation.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagInformation.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagInformation.java
index 03310ec..f71bcde 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagInformation.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagInformation.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-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagParser.java
index 805a29c..dee4c03 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/ETagParser.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
@@ -31,21 +31,21 @@ import java.util.regex.Pattern;
  * <p>See <a href="https://www.ietf.org/rfc/rfc7232.txt">RFC 7232</a> for details;
  * there the following grammar is defined:</p>
  * <pre>
- *     If-Match      = "*" / 1#entity-tag
- *     If-None-Match = "*" / 1#entity-tag
- *     entity-tag    = [ weak ] opaque-tag
- *     weak          = %x57.2F ; "W/", case-sensitive
- *     opaque-tag    = DQUOTE *etagc DQUOTE
- *     etagc         = %x21 / %x23-7E / %x80-FF
+ * If-Match = "*" / 1#entity-tag
+ * If-None-Match = "*" / 1#entity-tag
+ * entity-tag = [ weak ] opaque-tag
+ * weak = %x57.2F ; "W/", case-sensitive
+ * opaque-tag = DQUOTE *etagc DQUOTE
+ * etagc = %x21 / %x23-7E / %x80-FF
  * </pre>
  * <p>Values with illegal syntax do not contribute to the result but no exception is thrown.</p>
  */
 public class ETagParser {
 
   private static final Pattern ETAG = Pattern.compile("\\s*(,\\s*)+|((?:W/)?\"[!#-~\\x80-\\xFF]*\")");
-  
-  private ETagParser (){
-    //Private constructor for utility classes
+
+  private ETagParser() {
+    // Private constructor for utility classes
   }
 
   protected static Collection<String> parse(final Collection<String> values) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/PreconditionsValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/PreconditionsValidator.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/PreconditionsValidator.java
index a8690d1..414eacd 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/PreconditionsValidator.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/etag/PreconditionsValidator.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
@@ -42,7 +42,7 @@ public class PreconditionsValidator {
     return affectedEntitySetOrSingleton != null
         && (isMediaValue ?
             customETagSupport.hasMediaETag(affectedEntitySetOrSingleton) :
-            customETagSupport.hasETag(affectedEntitySetOrSingleton));
+              customETagSupport.hasETag(affectedEntitySetOrSingleton));
   }
 
   private EdmBindingTarget extractInformation(final UriInfo uriInfo) throws PreconditionException {
@@ -87,7 +87,7 @@ public class PreconditionsValidator {
     return lastFoundEntitySetOrSingleton;
   }
 
-  private EdmBindingTarget getEntitySetFromFunctionImport(UriResourceFunction uriResourceFunction) {
+  private EdmBindingTarget getEntitySetFromFunctionImport(final UriResourceFunction uriResourceFunction) {
     EdmFunctionImport functionImport = uriResourceFunction.getFunctionImport();
     if (functionImport != null && functionImport.getReturnedEntitySet() != null
         && !uriResourceFunction.isCollection()) {
@@ -96,12 +96,12 @@ public class PreconditionsValidator {
     return null;
   }
 
-  private EdmBindingTarget getEntitySet(UriResourceEntitySet uriResourceEntitySet) {
+  private EdmBindingTarget getEntitySet(final UriResourceEntitySet uriResourceEntitySet) {
     return uriResourceEntitySet.isCollection() ? null : uriResourceEntitySet.getEntitySet();
   }
 
-  private EdmBindingTarget getEntitySetFromNavigation(EdmBindingTarget lastFoundEntitySetOrSingleton,
-      UriResourceNavigation uriResourceNavigation) {
+  private EdmBindingTarget getEntitySetFromNavigation(final EdmBindingTarget lastFoundEntitySetOrSingleton,
+      final UriResourceNavigation uriResourceNavigation) {
     if (lastFoundEntitySetOrSingleton != null && !uriResourceNavigation.isCollection()) {
       EdmNavigationProperty navProp = uriResourceNavigation.getProperty();
       return lastFoundEntitySetOrSingleton.getRelatedBindingTarget(navProp.getName());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferParser.java
index eee7959..d142f09 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferParser.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
@@ -33,18 +33,18 @@ import org.apache.olingo.server.api.prefer.Preferences.Preference;
  * <p>See <a href="https://www.ietf.org/rfc/rfc7240.txt">RFC 7240</a> for details;
  * there the following grammar is defined:</p>
  * <pre>
- *     Prefer        = "Prefer" ":" 1#preference
- *     preference    = token [ BWS "=" BWS word ] *( OWS ";" [ OWS parameter ] )
- *     parameter     = token [ BWS "=" BWS word ]
- *     token         = 1*tchar
- *     tchar         = "!" / "#" / "$" / "%" / "&" / "'" / "*"
-                     / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
- *     word          = token / quoted-string
- *     quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
- *     qdtext        = HTAB / SP / %x21 / %x23-5B / %x5D-7E / %x80-FF
- *     quoted-pair   = "\" ( HTAB / SP / %x21-7E /  %x80-FF )
- *     OWS           = *( SP / HTAB )  ; optional whitespace
- *     BWS           = OWS             ; "bad" whitespace
+ * Prefer = "Prefer" ":" 1#preference
+ * preference = token [ BWS "=" BWS word ] *( OWS ";" [ OWS parameter ] )
+ * parameter = token [ BWS "=" BWS word ]
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
+ * word = token / quoted-string
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / %x21-7E / %x80-FF )
+ * OWS = *( SP / HTAB ) ; optional whitespace
+ * BWS = OWS ; "bad" whitespace
  * </pre>
  * <p>Values with illegal syntax do not contribute to the result but no exception is thrown.</p>
  */
@@ -58,9 +58,9 @@ public class PreferParser {
   private static final Pattern PREFERENCE = Pattern.compile("\\s*(,\\s*)+|"
       + "(?:" + namedValue + "((?:\\s*;\\s*(?:" + namedValue + ")?)*))");
   private static final Pattern PARAMETER = Pattern.compile("\\s*(;\\s*)+|(?:" + namedValue + ")");
-  
-  private PreferParser (){
-    //Private constructor for utility classes
+
+  private PreferParser() {
+    // Private constructor for utility classes
   }
 
   protected static Map<String, Preference> parse(final Collection<String> values) {
@@ -77,7 +77,7 @@ public class PreferParser {
     return result;
   }
 
-  private static void parse(final String value, Map<String, Preference> result) {
+  private static void parse(final String value, final Map<String, Preference> result) {
     Map<String, Preference> partResult = new HashMap<String, Preference>();
     String separator = "";
     int start = 0;
@@ -90,13 +90,13 @@ public class PreferParser {
         final String name = matcher.group(2).toLowerCase(Locale.ROOT);
         // RFC 7240:
         // If any preference is specified more than once, only the first instance is to be
-        // considered.  All subsequent occurrences SHOULD be ignored without signaling
+        // considered. All subsequent occurrences SHOULD be ignored without signaling
         // an error or otherwise altering the processing of the request.
         if (!partResult.containsKey(name)) {
           final String preferenceValue = getValue(matcher.group(3));
           final Map<String, String> parameters =
               matcher.group(4) == null || matcher.group(4).isEmpty() ? null :
-                  parseParameters(matcher.group(4));
+                parseParameters(matcher.group(4));
           partResult.put(name, new Preference(preferenceValue, parameters));
         }
         separator = null;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
index ecafdc4..85a724d 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.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
@@ -41,14 +41,17 @@ public class PreferencesImpl implements Preferences {
     preferences = PreferParser.parse(preferHeaders);
   }
 
+  @Override
   public Preference getPreference(final String name) {
     return preferences.get(name.toLowerCase(Locale.ROOT));
   }
 
+  @Override
   public boolean hasAllowEntityReferences() {
     return preferences.containsKey(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
   }
 
+  @Override
   public URI getCallback() {
     if (preferences.containsKey(PreferenceName.CALLBACK.getName())
         && preferences.get(PreferenceName.CALLBACK.getName()).getParameters() != null
@@ -62,18 +65,22 @@ public class PreferencesImpl implements Preferences {
     return null;
   }
 
+  @Override
   public boolean hasContinueOnError() {
     return preferences.containsKey(PreferenceName.CONTINUE_ON_ERROR.getName());
   }
 
+  @Override
   public Integer getMaxPageSize() {
     return getNonNegativeIntegerPreference(PreferenceName.MAX_PAGE_SIZE.getName());
   }
 
+  @Override
   public boolean hasTrackChanges() {
     return preferences.containsKey(PreferenceName.TRACK_CHANGES.getName());
   }
 
+  @Override
   public Return getReturn() {
     if (preferences.containsKey(PreferenceName.RETURN.getName())) {
       final String value = preferences.get(PreferenceName.RETURN.getName()).getValue();
@@ -86,10 +93,12 @@ public class PreferencesImpl implements Preferences {
     return null;
   }
 
+  @Override
   public boolean hasRespondAsync() {
     return preferences.containsKey(PreferenceName.RESPOND_ASYNC.getName());
   }
 
+  @Override
   public Integer getWait() {
     return getNonNegativeIntegerPreference(PreferenceName.WAIT.getName());
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AbstractODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AbstractODataSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AbstractODataSerializer.java
index 0f0eff6..d29b3ff 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AbstractODataSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AbstractODataSerializer.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
@@ -28,7 +28,8 @@ public abstract class AbstractODataSerializer implements ODataSerializer {
 
   protected static final String IO_EXCEPTION_TEXT = "An I/O exception occurred.";
 
-  protected void closeCircleStreamBufferOutput(OutputStream outputStream, SerializerException cachedException)
+  protected void closeCircleStreamBufferOutput(final OutputStream outputStream,
+      final SerializerException cachedException)
       throws SerializerException {
     if (outputStream != null) {
       try {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/371bf9a5/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AsyncResponseSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AsyncResponseSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AsyncResponseSerializer.java
index 6f431d4..ac779fc 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AsyncResponseSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/AsyncResponseSerializer.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,10 +18,6 @@
  */
 package org.apache.olingo.server.core.serializer;
 
-import org.apache.olingo.commons.api.http.HttpStatusCode;
-import org.apache.olingo.server.api.ODataResponse;
-import org.apache.olingo.server.api.serializer.SerializerException;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -34,6 +30,10 @@ import java.nio.channels.WritableByteChannel;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.olingo.commons.api.http.HttpStatusCode;
+import org.apache.olingo.server.api.ODataResponse;
+import org.apache.olingo.server.api.serializer.SerializerException;
+
 public class AsyncResponseSerializer {
   private static final int BUFFER_SIZE = 8192;
   private static final String COLON = ":";
@@ -59,10 +59,10 @@ public class AsyncResponseSerializer {
   }
 
   private void appendResponseHeader(final ODataResponse response,
-                                    final ByteArrayOutputStream buffer) throws IOException {
+      final ByteArrayOutputStream buffer) throws IOException {
     final Map<String, List<String>> header = response.getAllHeaders();
 
-    for (final Map.Entry<String, List<String>> entry: header.entrySet()) {
+    for (final Map.Entry<String, List<String>> entry : header.entrySet()) {
       appendHeader(entry.getKey(), entry.getValue(), buffer);
     }
   }
@@ -80,7 +80,7 @@ public class AsyncResponseSerializer {
     append(HTTP_VERSION + SP + response.getStatusCode() + SP + status + CRLF, buffer);
   }
 
-  private void appendBody(ODataResponse response, ByteArrayOutputStream buffer) throws IOException {
+  private void appendBody(final ODataResponse response, final ByteArrayOutputStream buffer) throws IOException {
     InputStream input = response.getContent();
     if (input != null) {
       ByteBuffer inBuffer = ByteBuffer.allocate(BUFFER_SIZE);