http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOption.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOption.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOption.java index 2d3cd0d..f58cb04 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOption.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOption.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOptionKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOptionKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOptionKind.java index 431882c..248790e 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOptionKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/SystemQueryOptionKind.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.java index 9e782e5..227bc80 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Alias.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Alias.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Alias.java index 9d44c65..33f2dc2 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Alias.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Alias.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Binary.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Binary.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Binary.java index c13d15f..dcd039c 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Binary.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Binary.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/BinaryOperatorKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/BinaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/BinaryOperatorKind.java index 9db126d..a693728 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/BinaryOperatorKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/BinaryOperatorKind.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 @@ -106,7 +106,7 @@ public enum BinaryOperatorKind { /** * URI syntax to enumeration value - * @param operator Operator in the syntax used in the URI + * @param operator Operator in the syntax used in the URI * @return Operator kind which represents the given syntax */ public static BinaryOperatorKind get(final String operator) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Enumeration.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Enumeration.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Enumeration.java index 641794c..7cb1834 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Enumeration.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Enumeration.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,10 @@ */ package org.apache.olingo.server.api.uri.queryoption.expression; -import org.apache.olingo.commons.api.edm.EdmEnumType; - import java.util.List; +import org.apache.olingo.commons.api.edm.EdmEnumType; + /** * Represents a enumeration expression node in the expression tree * <br> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Expression.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Expression.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Expression.java index e24e5ce..f324834 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Expression.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Expression.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 @@ -22,5 +22,5 @@ package org.apache.olingo.server.api.uri.queryoption.expression; * Super class of all classes used to build the expression tree */ public interface Expression extends VisitableExpression { -//No additional methods needed for now. + //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java index f494028..c114c65 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.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 @@ -27,15 +27,15 @@ public class ExpressionVisitException extends ODataException { private static final long serialVersionUID = 1L; - public ExpressionVisitException(String msg) { + public ExpressionVisitException(final String msg) { super(msg); } - public ExpressionVisitException(String msg, Throwable cause) { + public ExpressionVisitException(final String msg, final Throwable cause) { super(msg, cause); } - public ExpressionVisitException(Throwable cause) { + public ExpressionVisitException(final Throwable cause) { super(cause); } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitor.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitor.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitor.java index 147e65e..e2d4f94 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitor.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitor.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,16 +18,16 @@ */ package org.apache.olingo.server.api.uri.queryoption.expression; +import java.util.List; + import org.apache.olingo.commons.api.edm.EdmEnumType; import org.apache.olingo.commons.api.edm.EdmType; import org.apache.olingo.server.api.ODataApplicationException; import org.apache.olingo.server.api.uri.UriInfoResource; -import java.util.List; - /** * Generic interface to define expression visitors with arbitrary return types. - * + * * @param <T> Return type */ public interface ExpressionVisitor<T> { @@ -47,7 +47,7 @@ public interface ExpressionVisitor<T> { /** * Called for each traversed {@link Unary} expression * @param operator Operator kind - * @param operand return value of sub tree + * @param operand return value of sub tree * @return Application return value of type T * @throws ExpressionVisitException Thrown if an exception while traversing occured * @throws ODataApplicationException Thrown by the application http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/LambdaRef.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/LambdaRef.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/LambdaRef.java index 3830e3b..c4f5d96 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/LambdaRef.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/LambdaRef.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Literal.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Literal.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Literal.java index d1a50dc..524074d 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Literal.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Literal.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Member.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Member.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Member.java index 4aa9fd3..e39c0f8 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Member.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Member.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Method.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Method.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Method.java index 00bb69b..10b213f 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Method.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Method.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/MethodKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/MethodKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/MethodKind.java index ef0d7cf..93e5e4b 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/MethodKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/MethodKind.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 @@ -74,7 +74,7 @@ public enum MethodKind { /** * URI syntax to enumeration value - * @param method Method in the syntax used in the URI + * @param method Method in the syntax used in the URI * @return Method kind which represents the given syntax */ public static MethodKind get(final String method) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.java index c259eba..5fe7639 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Unary.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Unary.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Unary.java index 7f37a0c..c84784b 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Unary.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/Unary.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/UnaryOperatorKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/UnaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/UnaryOperatorKind.java index 3e0907b..a5b070c 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/UnaryOperatorKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/UnaryOperatorKind.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/VisitableExpression.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/VisitableExpression.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/VisitableExpression.java index 1588dcf..b4a6c5f 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/VisitableExpression.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/VisitableExpression.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinary.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinary.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinary.java index f24554d..856a266 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinary.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinary.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java index 224d3c1..cf7cbf5 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchExpression.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchExpression.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchExpression.java index f9b9c93..ed66f5f 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchExpression.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchExpression.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 @@ -19,5 +19,5 @@ package org.apache.olingo.server.api.uri.queryoption.search; public interface SearchExpression { -//No additional methods needed for now. + //No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchTerm.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchTerm.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchTerm.java index a3d69ad..9c3bdec 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchTerm.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchTerm.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnary.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnary.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnary.java index 2a424ce..5d8e143 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnary.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnary.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/d1507449/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java index 07d1302..9adb2db 100644 --- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java +++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.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/d1507449/lib/server-api/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java b/lib/server-api/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java index d2f9bef..3a3c66c 100644 --- a/lib/server-api/src/test/java/org/apache/olingo/server/api/ODataRequestTest.java +++ b/lib/server-api/src/test/java/org/apache/olingo/server/api/ODataRequestTest.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,11 +18,11 @@ */ package org.apache.olingo.server.api; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.Arrays; -import static org.junit.Assert.assertEquals; +import org.junit.Test; public class ODataRequestTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-api/src/test/java/org/apache/olingo/server/api/TranslatedExceptionsTest.java ---------------------------------------------------------------------- diff --git a/lib/server-api/src/test/java/org/apache/olingo/server/api/TranslatedExceptionsTest.java b/lib/server-api/src/test/java/org/apache/olingo/server/api/TranslatedExceptionsTest.java index c22546b..5fc2110 100644 --- a/lib/server-api/src/test/java/org/apache/olingo/server/api/TranslatedExceptionsTest.java +++ b/lib/server-api/src/test/java/org/apache/olingo/server/api/TranslatedExceptionsTest.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,6 +34,7 @@ public class TranslatedExceptionsTest { private static class TestException extends ODataTranslatedException { private static final long serialVersionUID = -7199975861656921724L; + public static enum Keys implements MessageKey { BASIC, ONEPARAM, TWOPARAM, NOMESSAGE, ONLY_ROOT, ONLY_GERMAN; @Override @@ -41,9 +42,11 @@ public class TranslatedExceptionsTest { return name(); } } + protected TestException(final MessageKey messageKey, final String... parameters) { super(DEV, messageKey, parameters); } + @Override protected String getBundleName() { return "i18n"; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ContentNegotiatorException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ContentNegotiatorException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ContentNegotiatorException.java index e2ee866..5f82570 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ContentNegotiatorException.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ContentNegotiatorException.java @@ -41,12 +41,14 @@ public class ContentNegotiatorException extends ODataTranslatedException { } } - public ContentNegotiatorException(String developmentMessage, MessageKey messageKey, String... parameters) { + public ContentNegotiatorException(final String developmentMessage, final MessageKey messageKey, + final String... parameters) { super(developmentMessage, messageKey, parameters); } - public ContentNegotiatorException(String developmentMessage, Throwable cause, MessageKey messageKey, - String... parameters) { + public ContentNegotiatorException(final String developmentMessage, final Throwable cause, + final MessageKey messageKey, + final String... parameters) { super(developmentMessage, cause, messageKey, parameters); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/DefaultRedirectProcessor.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/DefaultRedirectProcessor.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/DefaultRedirectProcessor.java index 9c728ab..efe3e71 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/DefaultRedirectProcessor.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/DefaultRedirectProcessor.java @@ -29,7 +29,7 @@ public class DefaultRedirectProcessor implements RedirectProcessor { @Override public void init(final OData odata, final ServiceMetadata serviceMetadata) { - //No init needed + // No init needed } @Override http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java index e20ad2a..8493f1d 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.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 @@ -21,8 +21,8 @@ package org.apache.olingo.server.core; import java.util.Locale; import org.apache.olingo.commons.api.http.HttpStatusCode; -import org.apache.olingo.server.api.ODataApplicationException; import org.apache.olingo.server.api.ClientServerError; +import org.apache.olingo.server.api.ODataApplicationException; import org.apache.olingo.server.api.ODataTranslatedException; import org.apache.olingo.server.api.ODataTranslatedException.ODataErrorMessage; import org.apache.olingo.server.api.deserializer.DeserializerException; @@ -34,13 +34,15 @@ import org.apache.olingo.server.core.uri.validator.UriValidationException; public class ODataExceptionHelper { - public static ClientServerError createServerErrorObject(UriValidationException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final UriValidationException e, + final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); serverError.setStatusCode(HttpStatusCode.BAD_REQUEST.getStatusCode()); return serverError; } - public static ClientServerError createServerErrorObject(UriParserSemanticException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final UriParserSemanticException e, + final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); if (UriParserSemanticException.MessageKeys.RESOURCE_NOT_FOUND.equals(e.getMessageKey()) || UriParserSemanticException.MessageKeys.PROPERTY_NOT_IN_TYPE.equals(e.getMessageKey())) { @@ -51,28 +53,30 @@ public class ODataExceptionHelper { return serverError; } - public static ClientServerError createServerErrorObject(UriParserSyntaxException e, Locale requestedLocale) { + public static ClientServerError + createServerErrorObject(final UriParserSyntaxException e, final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); serverError.setStatusCode( UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION_FORMAT.equals(e.getMessageKey()) ? HttpStatusCode.NOT_ACCEPTABLE.getStatusCode() : - HttpStatusCode.BAD_REQUEST.getStatusCode()); + HttpStatusCode.BAD_REQUEST.getStatusCode()); return serverError; } - public static ClientServerError createServerErrorObject(UriParserException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final UriParserException e, final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); serverError.setStatusCode(HttpStatusCode.BAD_REQUEST.getStatusCode()); return serverError; } - public static ClientServerError createServerErrorObject(ContentNegotiatorException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final ContentNegotiatorException e, + final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); serverError.setStatusCode(HttpStatusCode.NOT_ACCEPTABLE.getStatusCode()); return serverError; } - public static ClientServerError createServerErrorObject(ODataHandlerException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final ODataHandlerException e, final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); if (ODataHandlerException.MessageKeys.FUNCTIONALITY_NOT_IMPLEMENTED.equals(e.getMessageKey()) || ODataHandlerException.MessageKeys.PROCESSOR_NOT_IMPLEMENTED.equals(e.getMessageKey())) { @@ -88,7 +92,7 @@ public class ODataExceptionHelper { return serverError; } - public static ClientServerError createServerErrorObject(SerializerException e, Locale requestedLocale) { + public static ClientServerError createServerErrorObject(final SerializerException e, final Locale requestedLocale) { ClientServerError serverError = basicTranslatedError(e, requestedLocale); serverError.setStatusCode(HttpStatusCode.BAD_REQUEST.getStatusCode()); return serverError; @@ -99,11 +103,12 @@ public class ODataExceptionHelper { .setStatusCode(HttpStatusCode.BAD_REQUEST.getStatusCode()); } - public static ClientServerError createServerErrorObject(ODataTranslatedException e, Locale requestedLocale) { + public static ClientServerError + createServerErrorObject(final ODataTranslatedException e, final Locale requestedLocale) { return basicTranslatedError(e, requestedLocale); } - public static ClientServerError createServerErrorObject(ODataApplicationException e) { + public static ClientServerError createServerErrorObject(final ODataApplicationException e) { ClientServerError serverError = basicServerError(e); serverError.setStatusCode(e.getStatusCode()); serverError.setLocale(e.getLocale()); @@ -111,18 +116,19 @@ public class ODataExceptionHelper { return serverError; } - public static ClientServerError createServerErrorObject(Exception e) { + public static ClientServerError createServerErrorObject(final Exception e) { ClientServerError serverError = basicServerError(e); serverError.setStatusCode(HttpStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); serverError.setLocale(Locale.ENGLISH); return serverError; } - private static ClientServerError basicServerError(Exception e) { + private static ClientServerError basicServerError(final Exception e) { return new ClientServerError().setException(e).setMessage(e.getMessage()); } - private static ClientServerError basicTranslatedError(ODataTranslatedException e, Locale requestedLocale) { + private static ClientServerError basicTranslatedError(final ODataTranslatedException e, + final Locale requestedLocale) { ClientServerError serverError = basicServerError(e); ODataErrorMessage translatedMessage = e.getTranslatedMessage(requestedLocale); serverError.setMessage(translatedMessage.getMessage()); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java index 282504a..978dc54 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java @@ -34,11 +34,11 @@ import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpHeader; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory; +import org.apache.olingo.server.api.ClientServerError; import org.apache.olingo.server.api.OData; import org.apache.olingo.server.api.ODataApplicationException; import org.apache.olingo.server.api.ODataRequest; import org.apache.olingo.server.api.ODataResponse; -import org.apache.olingo.server.api.ClientServerError; import org.apache.olingo.server.api.ServiceMetadata; import org.apache.olingo.server.api.deserializer.DeserializerException; import org.apache.olingo.server.api.processor.ActionComplexCollectionProcessor; @@ -621,7 +621,7 @@ public class ODataHandler { } } - private void checkContentTypeSupport(ContentType requestFormat, RepresentationType representationType) + private void checkContentTypeSupport(final ContentType requestFormat, final RepresentationType representationType) throws ODataHandlerException, ContentNegotiatorException { ContentNegotiator.checkSupport(requestFormat, customContentTypeSupport, representationType); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandlerException.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandlerException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandlerException.java index 8ebbc26..38556fb 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandlerException.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandlerException.java @@ -25,13 +25,20 @@ public class ODataHandlerException extends ODataTranslatedException { private static final long serialVersionUID = -907752788975531134L; public static enum MessageKeys implements MessageKey { - /** parameters: HTTP method, HTTP method */ AMBIGUOUS_XHTTP_METHOD, - /** parameter: HTTP method */ INVALID_HTTP_METHOD, - /** parameter: HTTP method */ HTTP_METHOD_NOT_ALLOWED, - /** parameter: processor interface */ PROCESSOR_NOT_IMPLEMENTED, - /** no parameter */ FUNCTIONALITY_NOT_IMPLEMENTED, - /** parameter: content type */ UNSUPPORTED_CONTENT_TYPE, - /** parameter: version */ ODATA_VERSION_NOT_SUPPORTED; + /** parameters: HTTP method, HTTP method */ + AMBIGUOUS_XHTTP_METHOD, + /** parameter: HTTP method */ + INVALID_HTTP_METHOD, + /** parameter: HTTP method */ + HTTP_METHOD_NOT_ALLOWED, + /** parameter: processor interface */ + PROCESSOR_NOT_IMPLEMENTED, + /** no parameter */ + FUNCTIONALITY_NOT_IMPLEMENTED, + /** parameter: content type */ + UNSUPPORTED_CONTENT_TYPE, + /** parameter: version */ + ODATA_VERSION_NOT_SUPPORTED; @Override public String getKey() { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java index f7e7ecf..6b567f0 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.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,11 +33,11 @@ import javax.servlet.http.HttpServletResponse; import org.apache.olingo.commons.api.ODataRuntimeException; import org.apache.olingo.commons.api.http.HttpHeader; import org.apache.olingo.commons.api.http.HttpMethod; +import org.apache.olingo.server.api.ClientServerError; import org.apache.olingo.server.api.OData; import org.apache.olingo.server.api.ODataHttpHandler; import org.apache.olingo.server.api.ODataRequest; import org.apache.olingo.server.api.ODataResponse; -import org.apache.olingo.server.api.ClientServerError; import org.apache.olingo.server.api.ODataTranslatedException; import org.apache.olingo.server.api.ServiceMetadata; import org.apache.olingo.server.api.processor.Processor; @@ -63,7 +63,7 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler { ODataResponse odResponse; try { odRequest = new ODataRequest(); - fillODataRequest(odRequest, request, split); + fillODataRequest(odRequest, request, split); odResponse = handler.process(odRequest); // ALL future methods after process must not throw exceptions! } catch (Exception e) { @@ -74,11 +74,11 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler { } @Override - public void setSplit(int split) { + public void setSplit(final int split) { this.split = split; } - private ODataResponse handleException(ODataRequest odRequest, Exception e) { + private ODataResponse handleException(final ODataRequest odRequest, final Exception e) { ODataResponse resp = new ODataResponse(); ClientServerError serverError; if (e instanceof ODataHandlerException) { @@ -119,8 +119,8 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler { } } - private static void closeStream(Closeable closeable) { - if(closeable != null) { + private static void closeStream(final Closeable closeable) { + if (closeable != null) { try { closeable.close(); } catch (IOException e) { @@ -129,8 +129,9 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler { } } - private ODataRequest fillODataRequest(ODataRequest odRequest, final HttpServletRequest httpRequest, final int split) - throws ODataTranslatedException { + private ODataRequest fillODataRequest(final ODataRequest odRequest, final HttpServletRequest httpRequest, + final int split) + throws ODataTranslatedException { try { odRequest.setBody(httpRequest.getInputStream()); extractHeaders(odRequest, httpRequest); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java index 29931a2..ea936fd 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.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 @@ -76,7 +76,8 @@ public class ODataImpl extends OData { } @Override - public ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references) { + public ServiceMetadata createServiceMetadata(final CsdlEdmProvider edmProvider, + final List<EdmxReference> references) { return new ServiceMetadataImpl(edmProvider, references); } @@ -91,7 +92,7 @@ public class ODataImpl extends OData { } @Override - public ODataDeserializer createDeserializer(ODataFormat format) throws DeserializerException { + public ODataDeserializer createDeserializer(final ODataFormat format) throws DeserializerException { ODataDeserializer serializer; switch (format) { case JSON: @@ -110,7 +111,7 @@ public class ODataImpl extends OData { } @Override - public EdmPrimitiveType createPrimitiveTypeInstance(EdmPrimitiveTypeKind kind) { + public EdmPrimitiveType createPrimitiveTypeInstance(final EdmPrimitiveTypeKind kind) { return EdmPrimitiveTypeFactory.getInstance(kind); } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java index 86d6e5a..e788600 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java @@ -18,16 +18,16 @@ */ package org.apache.olingo.server.core; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider; import org.apache.olingo.commons.core.edm.EdmProviderImpl; -import org.apache.olingo.server.api.edmx.EdmxReference; import org.apache.olingo.server.api.ServiceMetadata; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; +import org.apache.olingo.server.api.edmx.EdmxReference; /** */ @@ -36,8 +36,8 @@ public class ServiceMetadataImpl implements ServiceMetadata { private final EdmProviderImpl edm; private final List<EdmxReference> references = new ArrayList<EdmxReference>(); - public ServiceMetadataImpl(CsdlEdmProvider edmProvider, List<EdmxReference> references) { - this.edm = new EdmProviderImpl(edmProvider); + public ServiceMetadataImpl(final CsdlEdmProvider edmProvider, final List<EdmxReference> references) { + edm = new EdmProviderImpl(edmProvider); this.references.addAll(references); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFascadeImpl.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFascadeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFascadeImpl.java index 6b2ee39..31a73d3 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFascadeImpl.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFascadeImpl.java @@ -31,23 +31,24 @@ import org.apache.olingo.server.core.deserializer.batch.BatchParserCommon; public class BatchFascadeImpl implements BatchFacade { private final BatchPartHandler partHandler; - public BatchFascadeImpl(ODataHandler oDataHandler, ODataRequest request, BatchProcessor batchProcessor, + public BatchFascadeImpl(final ODataHandler oDataHandler, final ODataRequest request, + final BatchProcessor batchProcessor, final boolean isStrict) { partHandler = new BatchPartHandler(oDataHandler, batchProcessor, this); } @Override - public ODataResponse handleODataRequest(ODataRequest request) throws BatchDeserializerException { + public ODataResponse handleODataRequest(final ODataRequest request) throws BatchDeserializerException { return partHandler.handleODataRequest(request); } @Override - public ODataResponsePart handleBatchRequest(BatchRequestPart request) throws BatchDeserializerException { + public ODataResponsePart handleBatchRequest(final BatchRequestPart request) throws BatchDeserializerException { return partHandler.handleBatchRequest(request); } @Override - public String extractBoundaryFromContentType(String contentType) throws BatchDeserializerException { + public String extractBoundaryFromContentType(final String contentType) throws BatchDeserializerException { return BatchParserCommon.getBoundary(contentType, 0); } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java index e8fe1db..3f63804 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java @@ -34,7 +34,7 @@ import org.apache.olingo.server.core.deserializer.batch.BatchParserCommon; public class BatchHandler { private final BatchProcessor batchProcessor; private final ODataHandler oDataHandler; - + public BatchHandler(final ODataHandler oDataHandler, final BatchProcessor batchProcessor) { this.batchProcessor = batchProcessor; @@ -44,7 +44,7 @@ public class BatchHandler { public void process(final ODataRequest request, final ODataResponse response, final boolean isStrict) throws DeserializerException, SerializerException { validateRequest(request); - + final BatchFacade operation = new BatchFascadeImpl(oDataHandler, request, batchProcessor, isStrict); batchProcessor.processBatch(operation, request, response); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchPartHandler.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchPartHandler.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchPartHandler.java index b140b0b..4c7783c 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchPartHandler.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchPartHandler.java @@ -38,16 +38,16 @@ public class BatchPartHandler { public BatchPartHandler(final ODataHandler oDataHandler, final BatchProcessor processor, final BatchFacade batchFascade) { this.oDataHandler = oDataHandler; - this.batchProcessor = processor; + batchProcessor = processor; this.batchFascade = batchFascade; - this.rewriter = new BatchReferenceRewriter(); + rewriter = new BatchReferenceRewriter(); } - public ODataResponse handleODataRequest(ODataRequest request) throws BatchDeserializerException { + public ODataResponse handleODataRequest(final ODataRequest request) throws BatchDeserializerException { return handle(request, true); } - public ODataResponsePart handleBatchRequest(BatchRequestPart request) throws BatchDeserializerException { + public ODataResponsePart handleBatchRequest(final BatchRequestPart request) throws BatchDeserializerException { if (request.isChangeSet()) { return handleChangeSet(request); } else { @@ -57,7 +57,7 @@ public class BatchPartHandler { } } - public ODataResponse handle(ODataRequest request, boolean isChangeSet) + public ODataResponse handle(final ODataRequest request, final boolean isChangeSet) throws BatchDeserializerException { final ODataResponse response; @@ -80,7 +80,7 @@ public class BatchPartHandler { return response; } - private ODataResponsePart handleChangeSet(BatchRequestPart request) throws BatchDeserializerException { + private ODataResponsePart handleChangeSet(final BatchRequestPart request) throws BatchDeserializerException { return batchProcessor.processChangeSet(batchFascade, request.getRequests()); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java index 9f0429a..a39f8c5 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java @@ -38,13 +38,13 @@ public class BatchReferenceRewriter { private Map<String, String> contentIdMapping = new HashMap<String, String>(); - public String getReferenceInURI(ODataRequest request) { + public String getReferenceInURI(final ODataRequest request) { Matcher matcher = REFERENCE_PATTERN.matcher(removeSlash(removeSlash(request.getRawODataPath(), true), false)); return (matcher.matches()) ? matcher.group(1) : null; } - public void replaceReference(ODataRequest request) { + public void replaceReference(final ODataRequest request) { final String reference = getReferenceInURI(request); if (reference != null) { @@ -58,13 +58,13 @@ public class BatchReferenceRewriter { } } - private void replaceContentIdReference(ODataRequest request, String contentId, String resourceUri) { + private void replaceContentIdReference(final ODataRequest request, final String contentId, final String resourceUri) { final String newUri = request.getRawODataPath().replace("/$" + contentId, resourceUri); request.setRawODataPath(newUri); request.setRawRequestUri(request.getRawBaseUri() + "/" + newUri); } - public void addMapping(ODataRequest request, ODataResponse response) + public void addMapping(final ODataRequest request, final ODataResponse response) throws BatchDeserializerException { final String resourceUri = getODataPath(request, response); final String contentId = request.getHeader(BatchParserCommon.HTTP_CONTENT_ID); @@ -72,7 +72,8 @@ public class BatchReferenceRewriter { contentIdMapping.put(contentId, resourceUri); } - private String getODataPath(ODataRequest request, ODataResponse response) throws BatchDeserializerException { + private String getODataPath(final ODataRequest request, final ODataResponse response) + throws BatchDeserializerException { String resourceUri = null; if (request.getMethod() == HttpMethod.POST) { @@ -89,17 +90,17 @@ public class BatchReferenceRewriter { return resourceUri; } - private String parseODataPath(String uri, String rawBaseUri) throws BatchDeserializerException { + private String parseODataPath(final String uri, final String rawBaseUri) throws BatchDeserializerException { int index = uri.indexOf(rawBaseUri); - - if(index == 0) { + + if (index == 0) { return uri.substring(rawBaseUri.length()); } else { throw new BatchDeserializerException("Invalid base uri or uri", MessageKeys.INVALID_URI, 0); } } - private String removeSlash(String rawODataPath, boolean first) { + private String removeSlash(final String rawODataPath, final boolean first) { final int indexOfSlash = rawODataPath.indexOf("/"); if (first) { return (indexOfSlash == 0) ? rawODataPath.substring(1) : rawODataPath; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 acfbe69..654d37c 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 @@ -38,7 +38,7 @@ public class DeserializerResultImpl implements DeserializerResult { private Property property; private Map<String, Parameter> actionParametes; private List<URI> entityReferences; - + private DeserializerResultImpl() {} @Override @@ -55,7 +55,7 @@ public class DeserializerResultImpl implements DeserializerResult { public ExpandOption getExpandTree() { return expandOption; } - + @Override public Map<String, Parameter> getActionParameters() { return actionParametes; @@ -70,11 +70,11 @@ public class DeserializerResultImpl implements DeserializerResult { public List<URI> getEntityReferences() { return entityReferences; } - + public static DeserializerResultBuilder with() { return new DeserializerResultBuilder(); } - + public static class DeserializerResultBuilder { private Entity entity; private EntityCollection entitySet; @@ -82,7 +82,7 @@ public class DeserializerResultImpl implements DeserializerResult { private Property property; private Map<String, Parameter> actionParametes; private List<URI> entityReferences; - + public DeserializerResult build() { DeserializerResultImpl result = new DeserializerResultImpl(); result.entity = entity; @@ -91,7 +91,7 @@ public class DeserializerResultImpl implements DeserializerResult { result.property = property; result.entityReferences = (entityReferences == null) ? new ArrayList<URI>() : entityReferences; result.actionParametes = (actionParametes == null) ? new LinkedHashMap<String, Parameter>() : actionParametes; - + return result; } @@ -109,19 +109,19 @@ public class DeserializerResultImpl implements DeserializerResult { this.expandOption = expandOption; return this; } - + public DeserializerResultBuilder property(final Property property) { this.property = property; return this; } - + public DeserializerResultBuilder entityReferences(final List<URI> entityReferences) { this.entityReferences = entityReferences; return this; } - + public DeserializerResultBuilder actionParameters(final Map<String, Parameter> actionParameters) { - this.actionParametes = actionParameters; + actionParametes = actionParameters; return this; } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 c5aca72..fe12ca7 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 @@ -33,7 +33,7 @@ import org.apache.olingo.server.core.deserializer.batch.BatchParser; public class FixedFormatDeserializerImpl implements FixedFormatDeserializer { @Override - public byte[] binary(InputStream content) throws DeserializerException { + public byte[] binary(final InputStream content) throws DeserializerException { ByteArrayOutputStream result = new ByteArrayOutputStream(); byte[] buffer = new byte[128]; int count; @@ -50,8 +50,9 @@ public class FixedFormatDeserializerImpl implements FixedFormatDeserializer { } @Override - public List<BatchRequestPart> parseBatchRequest(InputStream content, String boundary, BatchOptions options) - throws BatchDeserializerException { + public List<BatchRequestPart> parseBatchRequest(final InputStream content, final String boundary, + final BatchOptions options) + throws BatchDeserializerException { final BatchParser parser = new BatchParser(); return parser.parseBatchRequest(content, boundary, options); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 a11b886..cfb531f 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 @@ -67,7 +67,7 @@ public class BatchBodyPart implements BatchPart { return isChangeSet; } - private List<BatchQueryOperation> consumeRequest(final List<Line> remainingMessage) + private List<BatchQueryOperation> consumeRequest(final List<Line> remainingMessage) throws BatchDeserializerException { if (isChangeSet) { return consumeChangeSet(remainingMessage); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 f7a78b8..17b10bc 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 @@ -33,16 +33,17 @@ public class BatchParser { private BatchOptions options; - public List<BatchRequestPart> parseBatchRequest(InputStream content, String boundary, BatchOptions options) - throws BatchDeserializerException { + public List<BatchRequestPart> parseBatchRequest(final InputStream content, final String boundary, + final BatchOptions options) + throws BatchDeserializerException { this.options = options; - BatchRequestTransformator transformator = new BatchRequestTransformator(options.getRawBaseUri(), - options.getRawServiceResolutionUri()); + BatchRequestTransformator transformator = new BatchRequestTransformator(options.getRawBaseUri(), + options.getRawServiceResolutionUri()); return parse(content, boundary, transformator); } - private List<BatchRequestPart> parse(final InputStream in, String boundary, + private List<BatchRequestPart> parse(final InputStream in, final String boundary, final BatchRequestTransformator transformator) throws BatchDeserializerException { try { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 949e598..ed75acf 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 @@ -81,14 +81,14 @@ public class BatchParserCommon { BatchDeserializerException.MessageKeys.INVALID_CONTENT_TYPE, HttpContentType.MULTIPART_MIXED); } - public static String removeEndingSlash(String content) { + public static String removeEndingSlash(final String content) { String newContent = content.trim(); int lastSlashIndex = newContent.lastIndexOf('/'); return (lastSlashIndex == newContent.length() - 1) ? newContent.substring(0, newContent.length() - 1) : newContent; } - private static String trimQuota(String boundary) { + private static String trimQuota(final String boundary) { if (boundary.matches("\".*\"")) { return boundary.replace("\"", ""); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 6da8de8..16e8af3 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 @@ -54,7 +54,7 @@ public class BatchRequestTransformator { return resultList; } - private ODataRequest processQueryOperation(final BatchBodyPart bodyPart, final String baseUri, + private ODataRequest processQueryOperation(final BatchBodyPart bodyPart, final String baseUri, final BatchQueryOperation queryOperation) throws BatchDeserializerException { if (bodyPart.isChangeSet()) { BatchQueryOperation encapsulatedQueryOperation = ((BatchChangeSetPart) queryOperation).getRequest(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 2a55bed..e445e10 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 @@ -28,7 +28,7 @@ import org.apache.olingo.server.api.batch.exception.BatchDeserializerException.M public class BatchTransformatorCommon { - public static void validateContentType(final Header headers, final Pattern pattern) + public static void validateContentType(final Header headers, final Pattern pattern) throws BatchDeserializerException { List<String> contentTypes = headers.getHeaders(HttpHeader.CONTENT_TYPE); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 74b67cb..c4fb8f7 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 @@ -54,7 +54,7 @@ public class HttpRequestStatusLine { statusLine = httpStatusLine; requestBaseUri = baseUri; rawServiceResolutionUri = serviceResolutionUri; - + parse(); } @@ -72,7 +72,7 @@ public class HttpRequestStatusLine { } } - private void parseUri(String rawUri, String baseUri) throws BatchDeserializerException { + private void parseUri(final String rawUri, final String baseUri) throws BatchDeserializerException { try { final URI uri = new URI(rawUri); @@ -86,7 +86,7 @@ public class HttpRequestStatusLine { } } - private void parseAbsoluteUri(String rawUri, String baseUri) throws BatchDeserializerException { + private void parseAbsoluteUri(final String rawUri, final String baseUri) throws BatchDeserializerException { if (rawUri.startsWith(baseUri)) { final String relativeUri = removeLeadingSlash(rawUri.substring(baseUri.length())); parseRelativeUri(relativeUri); @@ -96,11 +96,11 @@ public class HttpRequestStatusLine { } } - private String removeLeadingSlash(String value) { + private String removeLeadingSlash(final String value) { return (value.length() > 0 && value.charAt(0) == '/') ? value.substring(1) : value; } - private void parseRelativeUri(String rawUri) throws BatchDeserializerException { + private void parseRelativeUri(final String rawUri) throws BatchDeserializerException { final Matcher relativeUriMatcher = PATTERN_RELATIVE_URI.matcher(rawUri); if (relativeUriMatcher.matches()) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 5e279bd..549cf33 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 @@ -17,24 +17,24 @@ * under the License. */ package org.apache.olingo.server.core.deserializer.helper; - + import org.apache.olingo.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.server.core.uri.UriInfoImpl; import org.apache.olingo.server.core.uri.UriResourceNavigationPropertyImpl; import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl; - + public abstract class ExpandTreeBuilder { public abstract ExpandTreeBuilder expand(EdmNavigationProperty edmNavigationProperty); - + protected ExpandItemImpl buildExpandItem(final EdmNavigationProperty edmNavigationProperty) { final ExpandItemImpl expandItem = new ExpandItemImpl(); final UriInfoImpl uriInfo = new UriInfoImpl(); final UriResourceNavigationPropertyImpl resourceNavigation = new UriResourceNavigationPropertyImpl(); - + resourceNavigation.setNavigationProperty(edmNavigationProperty); uriInfo.addResourcePart(resourceNavigation); expandItem.setResourcePath(uriInfo); - + return expandItem; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/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 4161af1..f154074 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 @@ -17,51 +17,51 @@ * under the License. */ package org.apache.olingo.server.core.deserializer.helper; - + import org.apache.olingo.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.server.api.uri.queryoption.ExpandOption; import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl; import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl; - + public class ExpandTreeBuilderImpl extends ExpandTreeBuilder { - + private ExpandOptionImpl expandOption = null; - + @Override - public ExpandTreeBuilder expand(EdmNavigationProperty edmNavigationProperty) { + public ExpandTreeBuilder expand(final EdmNavigationProperty edmNavigationProperty) { ExpandItemImpl expandItem = buildExpandItem(edmNavigationProperty); - - if(expandOption == null) { + + if (expandOption == null) { expandOption = new ExpandOptionImpl(); } expandOption.addExpandItem(expandItem); - + return new ExpandTreeBuilderInner(expandItem); } - + public ExpandOption build() { return expandOption; } - + private class ExpandTreeBuilderInner extends ExpandTreeBuilder { private ExpandItemImpl parent; - - public ExpandTreeBuilderInner(ExpandItemImpl expandItem) { + + public ExpandTreeBuilderInner(final ExpandItemImpl expandItem) { parent = expandItem; } - + @Override - public ExpandTreeBuilder expand(EdmNavigationProperty edmNavigationProperty) { - if(parent.getExpandOption() == null) { + public ExpandTreeBuilder expand(final EdmNavigationProperty edmNavigationProperty) { + if (parent.getExpandOption() == null) { final ExpandOptionImpl expandOption = new ExpandOptionImpl(); parent.setSystemQueryOption(expandOption); } - + final ExpandItemImpl expandItem = buildExpandItem(edmNavigationProperty); - ((ExpandOptionImpl)parent.getExpandOption()).addExpandItem(expandItem); - + ((ExpandOptionImpl) parent.getExpandOption()).addExpandItem(expandItem); + return new ExpandTreeBuilderInner(expandItem); } - + } } \ No newline at end of file
