http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java index cb13063..8e9a42a 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.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.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type String. */
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmTimeOfDay.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmTimeOfDay.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmTimeOfDay.java index fb10e02..7330fac 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmTimeOfDay.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmTimeOfDay.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.sql.Timestamp; import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + public final class EdmTimeOfDay extends SingletonPrimitiveType { private static final Pattern PATTERN = Pattern.compile( @@ -69,13 +69,13 @@ public final class EdmTimeOfDay extends SingletonPrimitiveType { } final String milliSeconds = decimals.length() > 3 ? decimals.substring(0, 3) : - decimals + "000".substring(decimals.length()); - final short millis = Short.parseShort(milliSeconds); - if (returnType.isAssignableFrom(Timestamp.class)) { - nanoSeconds = millis * 1000 * 1000; - } else { - dateTimeValue.set(Calendar.MILLISECOND, millis); - } + decimals + "000".substring(decimals.length()); + final short millis = Short.parseShort(milliSeconds); + if (returnType.isAssignableFrom(Timestamp.class)) { + nanoSeconds = millis * 1000 * 1000; + } else { + dateTimeValue.set(Calendar.MILLISECOND, millis); + } } try { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/SingletonPrimitiveType.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/SingletonPrimitiveType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/SingletonPrimitiveType.java index a4dd74d..2071f01 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/SingletonPrimitiveType.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/SingletonPrimitiveType.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/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/Uint7.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/Uint7.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/Uint7.java index 3ce0c4e..d521b46 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/Uint7.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/Uint7.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java index 2795c2e..d73daca 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.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 @@ -90,7 +90,7 @@ abstract class AbstractAtomDealer { writer.writeNamespace(StringUtils.EMPTY, Constants.NS_ATOM); writer.writeNamespace(XMLConstants.XML_NS_PREFIX, XMLConstants.XML_NS_URI); writer.writeNamespace(Constants.PREFIX_METADATA, Constants.NS_METADATA); - writer.writeNamespace(Constants.PREFIX_DATASERVICES, Constants.NS_DATASERVICES); + writer.writeNamespace(Constants.PREFIX_DATASERVICES, Constants.NS_DATASERVICES); writer.writeNamespace(Constants.PREFIX_GML, Constants.NS_GML); writer.writeNamespace(Constants.PREFIX_GEORSS, Constants.NS_GEORSS); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java index f2faaa9..c25da60 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.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 @@ -36,6 +36,8 @@ import javax.xml.stream.events.XMLEvent; import org.apache.commons.lang3.StringUtils; import org.apache.olingo.commons.api.Constants; +import org.apache.olingo.commons.api.ODataError; +import org.apache.olingo.commons.api.ODataPropertyType; import org.apache.olingo.commons.api.data.AbstractODataObject; import org.apache.olingo.commons.api.data.Annotation; import org.apache.olingo.commons.api.data.ComplexValue; @@ -51,8 +53,6 @@ import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.Valuable; import org.apache.olingo.commons.api.data.ValueType; -import org.apache.olingo.commons.api.ODataError; -import org.apache.olingo.commons.api.ODataPropertyType; import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; @@ -98,9 +98,9 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria final String stringValue = event.asCharacters().getData(); value = typeInfo == null ? stringValue : // TODO: add facets - ((EdmPrimitiveType) typeInfo.getType()).valueOfString(stringValue, true, null, - Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, true, - ((EdmPrimitiveType) typeInfo.getType()).getDefaultType()); + ((EdmPrimitiveType) typeInfo.getType()).valueOfString(stringValue, true, null, + Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, true, + ((EdmPrimitiveType) typeInfo.getType()).getDefaultType()); } if (event.isEndElement() && start.getName().equals(event.asEndElement().getName())) { @@ -176,7 +176,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria ValueType valueType = ValueType.COLLECTION_PRIMITIVE; final EdmTypeInfo type = typeInfo == null ? null : - new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build(); + new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build(); boolean foundEndProperty = false; while (reader.hasNext() && !foundEndProperty) { @@ -242,7 +242,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria } else if (child.isCharacters()) { type = typeInfo == null || typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE - : ODataPropertyType.ENUM; + : ODataPropertyType.ENUM; } else { type = ODataPropertyType.EMPTY; } @@ -280,15 +280,15 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria final String typeAttrValue = typeAttr == null ? null : typeAttr.getValue(); final EdmTypeInfo typeInfo = StringUtils.isBlank(typeAttrValue) ? null : - new EdmTypeInfo.Builder().setTypeExpression(typeAttrValue).build(); + new EdmTypeInfo.Builder().setTypeExpression(typeAttrValue).build(); if (typeInfo != null) { valuable.setType(typeInfo.internal()); } final ODataPropertyType propType = typeInfo == null ? guessPropertyType(reader, typeInfo) : - typeInfo.isCollection() ? ODataPropertyType.COLLECTION : - typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.COMPLEX; + typeInfo.isCollection() ? ODataPropertyType.COLLECTION : + typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.COMPLEX; if (nullAttr == null) { switch (propType) { @@ -317,10 +317,10 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria } } else { valuable.setValue(propType == ODataPropertyType.PRIMITIVE ? ValueType.PRIMITIVE : - propType == ODataPropertyType.ENUM ? ValueType.ENUM : - propType == ODataPropertyType.COMPLEX ? ValueType.COMPLEX : - propType == ODataPropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE, - null); + propType == ODataPropertyType.ENUM ? ValueType.ENUM : + propType == ODataPropertyType.COMPLEX ? ValueType.COMPLEX : + propType == ODataPropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE, + null); } } @@ -402,7 +402,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria } } - private StartElement getStartElement(XMLEventReader reader) throws XMLStreamException { + private StartElement getStartElement(final XMLEventReader reader) throws XMLStreamException { while (reader.hasNext()) { final XMLEvent innerEvent = reader.peek(); if (innerEvent.isCharacters() && innerEvent.asCharacters().isWhiteSpace()) { @@ -867,7 +867,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria return new ResWrap<T>( context == null ? null : URI.create(context.getValue()), - metadataETag == null ? null : metadataETag.getValue(), - object); + metadataETag == null ? null : metadataETag.getValue(), + object); } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java index 37cea8f..743b78c 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,6 +18,16 @@ */ package org.apache.olingo.commons.core.serialization; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.events.Attribute; +import javax.xml.stream.events.StartElement; +import javax.xml.stream.events.XMLEvent; + import org.apache.commons.lang3.StringUtils; import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.data.GeoUtils; @@ -34,15 +44,6 @@ import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.api.edm.geo.SRID; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.events.Attribute; -import javax.xml.stream.events.StartElement; -import javax.xml.stream.events.XMLEvent; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - class AtomGeoValueDeserializer { private List<Point> points(final XMLEventReader reader, final StartElement start, http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java index 37dd8bf..8254559 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,6 +18,12 @@ */ package org.apache.olingo.commons.core.serialization; +import java.util.Collections; +import java.util.Iterator; + +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamWriter; + import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.geo.Geospatial; @@ -30,11 +36,6 @@ import org.apache.olingo.commons.api.edm.geo.Point; import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; -import java.util.Collections; -import java.util.Iterator; - class AtomGeoValueSerializer { private void points(final XMLStreamWriter writer, final Iterator<Point> itor, final boolean wrap) http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java index 2a3bb4a..1ef177a 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.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 @@ -48,8 +48,8 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.format.ContentType; import org.apache.olingo.commons.api.serialization.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializerException; -import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory; import org.apache.olingo.commons.core.edm.EdmTypeInfo; +import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory; import com.fasterxml.aalto.stax.OutputFactoryImpl; @@ -72,7 +72,7 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize private void collection(final XMLStreamWriter writer, final ValueType valueType, final EdmPrimitiveTypeKind kind, final List<?> value) - throws XMLStreamException, EdmPrimitiveTypeException { + throws XMLStreamException, EdmPrimitiveTypeException { for (Object item : value) { writer.writeStartElement(Constants.PREFIX_METADATA, Constants.ELEM_ELEMENT, namespaceMetadata); value(writer, valueType, kind, item); @@ -82,7 +82,7 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize private void value(final XMLStreamWriter writer, final ValueType valueType, final EdmPrimitiveTypeKind kind, final Object value) - throws XMLStreamException, EdmPrimitiveTypeException { + throws XMLStreamException, EdmPrimitiveTypeException { if (value == null) { writer.writeAttribute(Constants.PREFIX_METADATA, namespaceMetadata, Constants.ATTR_NULL, Boolean.TRUE.toString()); @@ -91,8 +91,8 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize switch (valueType) { case PRIMITIVE: writer.writeCharacters(kind == null ? value.toString() : - EdmPrimitiveTypeFactory.getInstance(kind) // TODO: add facets - .valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null)); + EdmPrimitiveTypeFactory.getInstance(kind) // TODO: add facets + .valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null)); break; case ENUM: writer.writeCharacters(value.toString()); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/ContextURLParser.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/ContextURLParser.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/ContextURLParser.java index 1190a84..460cd16 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/ContextURLParser.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/ContextURLParser.java @@ -1,18 +1,18 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * 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 - * + * 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 - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -43,7 +43,7 @@ public class ContextURLParser { isEntity = true; contextUrl.suffix(Suffix.ENTITY); contextURLasString = contextURLasString.replace("/$entity", StringUtils.EMPTY). - replace("/@Element", StringUtils.EMPTY); + replace("/@Element", StringUtils.EMPTY); } else if (contextURLasString.endsWith("/$ref")) { contextUrl.suffix(Suffix.REFERENCE); contextURLasString = contextURLasString.replace("/$ref", StringUtils.EMPTY); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java index 313d32d..64f6c8a 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java @@ -74,7 +74,8 @@ public class JsonDeltaDeserializer extends JsonDeserializer { item.remove(Constants.JSON_CONTEXT); if (itemContextURL == null || itemContextURL.isEntity()) { - delta.getEntities().add(entityDeserializer.doDeserialize(item.traverse(parser.getCodec())).getPayload()); + delta.getEntities().add( + entityDeserializer.doDeserialize(item.traverse(parser.getCodec())).getPayload()); } else if (itemContextURL.isDeltaDeletedEntity()) { delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntity.class)); } else if (itemContextURL.isDeltaLink()) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java index 2c13d35..5163412 100755 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.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 @@ -32,6 +32,8 @@ import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.olingo.commons.api.Constants; +import org.apache.olingo.commons.api.ODataError; +import org.apache.olingo.commons.api.ODataPropertyType; import org.apache.olingo.commons.api.data.Annotatable; import org.apache.olingo.commons.api.data.Annotation; import org.apache.olingo.commons.api.data.ComplexValue; @@ -43,8 +45,6 @@ import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.Valuable; import org.apache.olingo.commons.api.data.ValueType; -import org.apache.olingo.commons.api.ODataError; -import org.apache.olingo.commons.api.ODataPropertyType; import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; @@ -103,7 +103,7 @@ public class JsonDeserializer implements ODataDeserializer { link.setInlineEntity(entityDeserializer.doDeserialize(inline.traverse(codec)).getPayload()); } else if (inline instanceof ArrayNode) { - link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE); + link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE); final EntityCollection entitySet = new EntityCollection(); for (final Iterator<JsonNode> entries = inline.elements(); entries.hasNext();) { @@ -212,24 +212,24 @@ public class JsonDeserializer implements ODataDeserializer { } final EdmTypeInfo typeInfo = typeExpression == null ? null : - new EdmTypeInfo.Builder().setTypeExpression(typeExpression).build(); + new EdmTypeInfo.Builder().setTypeExpression(typeExpression).build(); return new SimpleEntry<ODataPropertyType, EdmTypeInfo>(type, typeInfo); } private EdmPrimitiveTypeKind guessPrimitiveTypeKind(final JsonNode node) { return node.isShort() ? EdmPrimitiveTypeKind.Int16 : - node.isInt() ? EdmPrimitiveTypeKind.Int32 : - node.isLong() ? EdmPrimitiveTypeKind.Int64 : - node.isBoolean() ? EdmPrimitiveTypeKind.Boolean : - node.isFloat() ? EdmPrimitiveTypeKind.Single : - node.isDouble() ? EdmPrimitiveTypeKind.Double : - node.isBigDecimal() ? EdmPrimitiveTypeKind.Decimal : - EdmPrimitiveTypeKind.String; + node.isInt() ? EdmPrimitiveTypeKind.Int32 : + node.isLong() ? EdmPrimitiveTypeKind.Int64 : + node.isBoolean() ? EdmPrimitiveTypeKind.Boolean : + node.isFloat() ? EdmPrimitiveTypeKind.Single : + node.isDouble() ? EdmPrimitiveTypeKind.Double : + node.isBigDecimal() ? EdmPrimitiveTypeKind.Decimal : + EdmPrimitiveTypeKind.String; } protected void populate(final Annotatable annotatable, final List<Property> properties, final ObjectNode tree, final ObjectCodec codec) - throws IOException, EdmPrimitiveTypeException { + throws IOException, EdmPrimitiveTypeException { String type = null; Annotation annotation = null; @@ -256,7 +256,7 @@ public class JsonDeserializer implements ODataDeserializer { property.setName(field.getKey()); property.setType(type == null ? null - : new EdmTypeInfo.Builder().setTypeExpression(type).build().internal()); + : new EdmTypeInfo.Builder().setTypeExpression(type).build().internal()); type = null; value(property, field.getValue(), codec); @@ -274,11 +274,11 @@ public class JsonDeserializer implements ODataDeserializer { return node.isNull() ? null : typeInfo == null ? node.asText() : typeInfo.getPrimitiveTypeKind().isGeospatial() - ? getGeoDeserializer().deserialize(node, typeInfo) + ? getGeoDeserializer().deserialize(node, typeInfo) : ((EdmPrimitiveType) typeInfo.getType()) - .valueOfString(node.asText(), true, null, - Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, true, - ((EdmPrimitiveType) typeInfo.getType()).getDefaultType()); + .valueOfString(node.asText(), true, null, + Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, true, + ((EdmPrimitiveType) typeInfo.getType()).getDefaultType()); } private Object fromComplex(final ObjectNode node, final ObjectCodec codec) http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java index 248f425..99abccb 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java index 8a6030d..ddb789d 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.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 @@ -43,7 +43,7 @@ public class JsonEntitySerializer extends JsonSerializer { super(serverMode); } - public JsonEntitySerializer(boolean serverMode, ODataFormat format) { + public JsonEntitySerializer(final boolean serverMode, final ODataFormat format) { super(serverMode, format); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java index abf131b..01f2f65 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java index 02af3cf..b7a21da 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java index 33629f4..6bd3d7e 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.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 @@ -36,8 +36,8 @@ import org.apache.olingo.commons.api.edm.geo.MultiPolygon; import org.apache.olingo.commons.api.edm.geo.Point; import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.api.edm.geo.SRID; -import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; import org.apache.olingo.commons.core.edm.EdmTypeInfo; +import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; import com.fasterxml.jackson.databind.JsonNode; @@ -209,54 +209,54 @@ class JsonGeoValueDeserializer { final Iterator<JsonNode> cooItor = node.has(Constants.JSON_COORDINATES) ? node.get(Constants.JSON_COORDINATES).elements() - : Collections.<JsonNode> emptyList().iterator(); + : Collections.<JsonNode> emptyList().iterator(); - SRID srid = null; - if (node.has(Constants.JSON_CRS)) { - srid = SRID.valueOf( - node.get(Constants.JSON_CRS).get(Constants.PROPERTIES).get(Constants.JSON_NAME).asText().split(":")[1]); - } + SRID srid = null; + if (node.has(Constants.JSON_CRS)) { + srid = SRID.valueOf( + node.get(Constants.JSON_CRS).get(Constants.PROPERTIES).get(Constants.JSON_NAME).asText().split(":")[1]); + } - Geospatial value = null; - switch (actualType) { - case GeographyPoint: - case GeometryPoint: - value = point(cooItor, actualType, srid); - break; - - case GeographyMultiPoint: - case GeometryMultiPoint: - value = multipoint(cooItor, actualType, srid); - break; - - case GeographyLineString: - case GeometryLineString: - value = lineString(cooItor, actualType, srid); - break; - - case GeographyMultiLineString: - case GeometryMultiLineString: - value = multiLineString(cooItor, actualType, srid); - break; - - case GeographyPolygon: - case GeometryPolygon: - value = polygon(cooItor, actualType, srid); - break; - - case GeographyMultiPolygon: - case GeometryMultiPolygon: - value = multiPolygon(cooItor, actualType, srid); - break; - - case GeographyCollection: - case GeometryCollection: - value = collection(node.get(Constants.JSON_GEOMETRIES).elements(), actualType, srid); - break; - - default: - } + Geospatial value = null; + switch (actualType) { + case GeographyPoint: + case GeometryPoint: + value = point(cooItor, actualType, srid); + break; + + case GeographyMultiPoint: + case GeometryMultiPoint: + value = multipoint(cooItor, actualType, srid); + break; + + case GeographyLineString: + case GeometryLineString: + value = lineString(cooItor, actualType, srid); + break; + + case GeographyMultiLineString: + case GeometryMultiLineString: + value = multiLineString(cooItor, actualType, srid); + break; + + case GeographyPolygon: + case GeometryPolygon: + value = polygon(cooItor, actualType, srid); + break; + + case GeographyMultiPolygon: + case GeometryMultiPolygon: + value = multiPolygon(cooItor, actualType, srid); + break; + + case GeographyCollection: + case GeometryCollection: + value = collection(node.get(Constants.JSON_GEOMETRIES).elements(), actualType, srid); + break; + + default: + } - return value; + return value; } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java index a76797b..7cd382b 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.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,7 +18,8 @@ */ package org.apache.olingo.commons.core.serialization; -import com.fasterxml.jackson.core.JsonGenerator; +import java.io.IOException; + import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; @@ -34,7 +35,7 @@ import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.api.edm.geo.SRID; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; -import java.io.IOException; +import com.fasterxml.jackson.core.JsonGenerator; class JsonGeoValueSerializer { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java index 8679c6e..3636db6 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java index a4a5ec9..1c6a187 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.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,8 +22,8 @@ import java.io.IOException; import java.net.URI; import org.apache.olingo.commons.api.Constants; -import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.ODataErrorDetail; +import org.apache.olingo.commons.api.data.ResWrap; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java index 885ba30..8738dd5 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.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/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java index d531108..cd2227f 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.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 JsonPropertySerializer extends JsonSerializer { } else if (property.isPrimitive()) { final EdmTypeInfo typeInfo = property.getType() == null ? null - : new EdmTypeInfo.Builder().setTypeExpression(property.getType()).build(); + : new EdmTypeInfo.Builder().setTypeExpression(property.getType()).build(); jgen.writeFieldName(Constants.VALUE); primitiveValue(jgen, typeInfo, property.asPrimitive()); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java index 727e03e..92ce269 100755 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.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,8 +46,8 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializerException; -import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory; import org.apache.olingo.commons.core.edm.EdmTypeInfo; +import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; @@ -55,10 +55,10 @@ import com.fasterxml.jackson.core.JsonGenerator; public class JsonSerializer implements ODataSerializer { private static final EdmPrimitiveTypeKind[] NUMBER_TYPES = { - EdmPrimitiveTypeKind.Byte, EdmPrimitiveTypeKind.SByte, - EdmPrimitiveTypeKind.Single, EdmPrimitiveTypeKind.Double, - EdmPrimitiveTypeKind.Int16, EdmPrimitiveTypeKind.Int32, EdmPrimitiveTypeKind.Int64, - EdmPrimitiveTypeKind.Decimal + EdmPrimitiveTypeKind.Byte, EdmPrimitiveTypeKind.SByte, + EdmPrimitiveTypeKind.Single, EdmPrimitiveTypeKind.Double, + EdmPrimitiveTypeKind.Int16, EdmPrimitiveTypeKind.Int32, EdmPrimitiveTypeKind.Int64, + EdmPrimitiveTypeKind.Decimal }; private final JsonGeoValueSerializer geoSerializer = new JsonGeoValueSerializer(); @@ -71,7 +71,7 @@ public class JsonSerializer implements ODataSerializer { this(serverMode, ODataFormat.JSON_FULL_METADATA); } - public JsonSerializer(final boolean serverMode, ODataFormat format) { + public JsonSerializer(final boolean serverMode, final ODataFormat format) { this.serverMode = serverMode; this.format = format; } @@ -97,7 +97,7 @@ public class JsonSerializer implements ODataSerializer { } } - private void reference(ResWrap<URI> container, JsonGenerator json) throws IOException { + private void reference(final ResWrap<URI> container, final JsonGenerator json) throws IOException { json.writeStartObject(); json.writeStringField(Constants.JSON_CONTEXT, container.getContextURL().toASCIIString()); @@ -196,7 +196,7 @@ public class JsonSerializer implements ODataSerializer { } } - private boolean isEntitySetNavigation(Link link) { + private boolean isEntitySetNavigation(final Link link) { return Constants.ENTITY_SET_NAVIGATION_LINK_TYPE.equals(link.getType()); } @@ -247,14 +247,14 @@ public class JsonSerializer implements ODataSerializer { private void collection(final JsonGenerator jgen, final EdmTypeInfo typeInfo, final ValueType valueType, final List<?> value) - throws IOException, EdmPrimitiveTypeException { + throws IOException, EdmPrimitiveTypeException { jgen.writeStartArray(); for (Object item : value) { final EdmTypeInfo itemTypeInfo = typeInfo == null ? null - : new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build(); + : new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build(); switch (valueType) { case COLLECTION_PRIMITIVE: primitiveValue(jgen, itemTypeInfo, item); @@ -296,20 +296,20 @@ public class JsonSerializer implements ODataSerializer { } else { final String serialized = kind == null ? value.toString() - // TODO: add facets - : EdmPrimitiveTypeFactory.getInstance(kind). + // TODO: add facets + : EdmPrimitiveTypeFactory.getInstance(kind). valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null); - if (isNumber) { - jgen.writeNumber(serialized); - } else { - jgen.writeString(serialized); - } + if (isNumber) { + jgen.writeNumber(serialized); + } else { + jgen.writeString(serialized); + } } } private void complexValue(final JsonGenerator jgen, final EdmTypeInfo typeInfo, final List<Property> value, final Linked linked) - throws IOException, EdmPrimitiveTypeException { + throws IOException, EdmPrimitiveTypeException { jgen.writeStartObject(); if (typeInfo != null && format != ODataFormat.JSON_NO_METADATA) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/ActionMapKeyTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/ActionMapKeyTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/ActionMapKeyTest.java index ea5c9ec..96b8f37 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/ActionMapKeyTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/ActionMapKeyTest.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm; -import org.apache.olingo.commons.api.edm.EdmException; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.junit.Test; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.fail; +import org.apache.olingo.commons.api.edm.EdmException; +import org.apache.olingo.commons.api.edm.FullQualifiedName; +import org.junit.Test; + public class ActionMapKeyTest { private final FullQualifiedName fqn = new FullQualifiedName("namespace", "name"); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java index 453a01a..6a14de7 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.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/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCallCreateTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCallCreateTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCallCreateTest.java index ae1e4b7..7470f04 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCallCreateTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCallCreateTest.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,6 +18,19 @@ */ package org.apache.olingo.commons.core.edm; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmAction; import org.apache.olingo.commons.api.edm.EdmAnnotation; @@ -34,19 +47,6 @@ import org.apache.olingo.commons.api.edm.FullQualifiedName; import org.junit.Before; import org.junit.Test; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - public class EdmImplCallCreateTest { private final FullQualifiedName FQN = new FullQualifiedName("testNamespace", "testName"); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/FunctionMapKeyTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/FunctionMapKeyTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/FunctionMapKeyTest.java index 36c50ae..45c3cc9 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/FunctionMapKeyTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/FunctionMapKeyTest.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotSame; import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotSame; +import org.apache.olingo.commons.api.edm.FullQualifiedName; +import org.junit.Test; public class FunctionMapKeyTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/CommonPrimitiveTypeTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/CommonPrimitiveTypeTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/CommonPrimitiveTypeTest.java index 1e686c7..79464b1 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/CommonPrimitiveTypeTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/CommonPrimitiveTypeTest.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,21 +18,21 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.apache.olingo.commons.api.edm.EdmType; -import org.apache.olingo.commons.api.edm.constants.EdmTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Calendar; import java.util.UUID; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.apache.olingo.commons.api.edm.EdmType; +import org.apache.olingo.commons.api.edm.constants.EdmTypeKind; +import org.junit.Test; public class CommonPrimitiveTypeTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinaryTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinaryTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinaryTest.java index 2f14c79..ba5852b 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinaryTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinaryTest.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.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; - -import java.util.Arrays; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import java.util.Arrays; + +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; + public class EdmBinaryTest extends PrimitiveTypeBaseTest { private final EdmPrimitiveType instance = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.Binary); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBooleanTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBooleanTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBooleanTest.java index 5578ad0..f470c40 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBooleanTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBooleanTest.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,12 +18,12 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import static org.junit.Assert.assertEquals; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.junit.Test; -import static org.junit.Assert.assertEquals; - public class EdmBooleanTest extends PrimitiveTypeBaseTest { private final EdmPrimitiveType instance = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.Boolean); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByteTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByteTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByteTest.java index 74e434d..f5683b1 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByteTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByteTest.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmByteTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTest.java index 6e10d2b..bcd4576 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTest.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,15 +18,15 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; -import static org.junit.Assert.assertEquals; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmDateTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffsetTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffsetTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffsetTest.java index 3013916..d8ea7c9 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffsetTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffsetTest.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,17 +18,17 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.sql.Timestamp; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmDateTimeOffsetTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimalTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimalTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimalTest.java index a592351..1691d02 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimalTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimalTest.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,15 +18,15 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigDecimal; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmDecimalTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDoubleTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDoubleTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDoubleTest.java index 3d0ecbf..ecd7552 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDoubleTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDoubleTest.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,15 +18,15 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigDecimal; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmDoubleTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDurationTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDurationTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDurationTest.java index 8a55d07..32e75f5 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDurationTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDurationTest.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.math.BigDecimal; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmDurationTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeoTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeoTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeoTest.java index e3ac6b0..28f31e0 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeoTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeoTest.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,6 +18,13 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Iterator; + import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.edm.geo.GeospatialCollection; @@ -29,13 +36,6 @@ import org.apache.olingo.commons.api.edm.geo.Point; import org.apache.olingo.commons.api.edm.geo.Polygon; import org.junit.Test; -import java.util.Iterator; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - public class EdmGeoTest extends PrimitiveTypeBaseTest { @Test http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuidTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuidTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuidTest.java index a015550..38e7e00 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuidTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuidTest.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,13 +18,13 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.UUID; -import static org.junit.Assert.assertEquals; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmGuidTest extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16Test.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16Test.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16Test.java index c1f4b9a..1f5488a 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16Test.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16Test.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmInt16Test extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32Test.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32Test.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32Test.java index 2f1314f..948b73e 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32Test.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32Test.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmInt32Test extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64Test.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64Test.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64Test.java index 0030053..ead3f78 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64Test.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64Test.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,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.math.BigInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.junit.Test; public class EdmInt64Test extends PrimitiveTypeBaseTest { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmNullTest.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmNullTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmNullTest.java index ac69281..50e2930 100644 --- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmNullTest.java +++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmNullTest.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,12 +18,12 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import static org.junit.Assert.assertNull; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.junit.Test; -import static org.junit.Assert.assertNull; - public class EdmNullTest extends PrimitiveTypeBaseTest { @Test
