diff --git a/sdk/cosmos/changelog/README.md b/sdk/cosmos/changelog/README.md index beaff07fef3b..3c00e3cf3287 100644 --- a/sdk/cosmos/changelog/README.md +++ b/sdk/cosmos/changelog/README.md @@ -1,5 +1,8 @@ ## Changelog +### 3.3.1 +- Added @JsonIgnore on getLogger in JsonSerializable + ### 3.3.0 - **Version Upgrades** - Project Reactor version upgrade to 3.3.0.RELEASE diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml index 4c10b94c262b..7604f27acb91 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos-benchmark - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Benchmarking tool This package contains Benchmarking tool for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -33,7 +33,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 diff --git a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml index 4a55aa812f07..11662f8db5bc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos-examples/pom.xml @@ -8,12 +8,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos-examples - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service - Examples This package contains examples for Microsoft Azure SDK for SQL API of Azure Cosmos DB Service https://github.com/Azure/azure-sdk-for-java @@ -89,7 +89,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 diff --git a/sdk/cosmos/microsoft-azure-cosmos/pom.xml b/sdk/cosmos/microsoft-azure-cosmos/pom.xml index 2660c5b31a7a..abe32ef363c3 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos/pom.xml @@ -7,12 +7,12 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension rx support) for Azure Cosmos DB SQL API jar diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java index 613abb4b0aa0..a70ec3c7e896 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/JsonSerializable.java @@ -5,6 +5,7 @@ import com.azure.data.cosmos.internal.Strings; import com.azure.data.cosmos.internal.Utils; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -32,14 +33,14 @@ public class JsonSerializable { private final static ObjectMapper OBJECT_MAPPER = Utils.getSimpleObjectMapper(); private ObjectMapper om; transient ObjectNode propertyBag = null; - + protected JsonSerializable() { this.propertyBag = OBJECT_MAPPER.createObjectNode(); } /** * Constructor. - * + * * @param jsonString the json string that represents the JsonSerializable. * @param objectMapper the custom object mapper */ @@ -48,10 +49,10 @@ protected JsonSerializable() { this.propertyBag = fromJson(jsonString); this.om = objectMapper; } - + /** * Constructor. - * + * * @param jsonString the json string that represents the JsonSerializable. */ protected JsonSerializable(String jsonString) { @@ -76,7 +77,7 @@ private ObjectMapper getMapper() { void setMapper(ObjectMapper om) { this.om = om; } - + private static void checkForValidPOJO(Class c) { if (c.isAnonymousClass() || c.isLocalClass()) { throw new IllegalArgumentException( @@ -88,6 +89,7 @@ private static void checkForValidPOJO(Class c) { } } + @JsonIgnore public Logger getLogger() { return logger; } @@ -106,7 +108,7 @@ public Map getMap() { /** * Checks whether a property exists. - * + * * @param propertyName the property to look up. * @return true if the property exists. */ @@ -116,7 +118,7 @@ public boolean has(String propertyName) { /** * Removes a value by propertyName. - * + * * @param propertyName the property to remove. */ void remove(String propertyName) { @@ -125,7 +127,7 @@ void remove(String propertyName) { /** * Sets the value of a property. - * + * * @param the type of the object. * @param propertyName the property to set. * @param value the value of the property. @@ -183,7 +185,7 @@ private void internalSetCollection(String propertyName, Collection collec /** * Gets a property value as Object. - * + * * @param propertyName the property to get. * @return the value of the property. */ @@ -194,10 +196,10 @@ public Object get(String propertyName) { return null; } } - + /** * Gets a string value. - * + * * @param propertyName the property to get. * @return the string value. */ @@ -211,7 +213,7 @@ public String getString(String propertyName) { /** * Gets a boolean value. - * + * * @param propertyName the property to get. * @return the boolean value. */ @@ -225,7 +227,7 @@ public Boolean getBoolean(String propertyName) { /** * Gets an integer value. - * + * * @param propertyName the property to get. * @return the boolean value */ @@ -239,7 +241,7 @@ public Integer getInt(String propertyName) { /** * Gets a long value. - * + * * @param propertyName the property to get. * @return the long value */ @@ -253,7 +255,7 @@ public Long getLong(String propertyName) { /** * Gets a double value. - * + * * @param propertyName the property to get. * @return the double value. */ @@ -267,7 +269,7 @@ public Double getDouble(String propertyName) { /** * Gets an object value. - * + * * @param the type of the object. * @param propertyName the property to get. * @param c the class of the object. If c is a POJO class, it must be a member (and not an anonymous or local) @@ -390,7 +392,7 @@ public List getList(String propertyName, Class c, boolean ... convertF /** * Gets an object collection. - * + * * @param the type of the objects in the collection. * @param propertyName the property to get * @param c the class of the object. If c is a POJO class, it must be a member (and not an anonymous or local) @@ -405,7 +407,7 @@ public Collection getCollection(String propertyName, Class c, boolean /** * Gets a JSONObject. - * + * * @param propertyName the property to get. * @return the JSONObject. */ @@ -419,7 +421,7 @@ ObjectNode getObject(String propertyName) { /** * Gets a JSONObject collection. - * + * * @param propertyName the property to get. * @return the JSONObject collection. */ @@ -433,12 +435,12 @@ Collection getCollection(String propertyName) { } } - return result; + return result; } /** * Gets the value of a property identified by an array of property names that forms the path. - * + * * @param propertyNames that form the path to the property to get. * @return the value of the property. */ @@ -462,12 +464,12 @@ public Object getObjectByPath(List propertyNames) { break; } } while (iterator.hasNext()); - + if (value != null && matchedProperties == propertyNames.size()) { return getValue(value); } } - + return null; } @@ -517,7 +519,7 @@ private String toPrettyJson(Object object){ /** * Converts to an Object (only POJOs and JSONObject are supported). - * + * * @param the type of the object. * @param c the class of the object, either a POJO class or JSONObject. If c is a POJO class, it must be a member * (and not an anonymous or local) and a static one. @@ -547,16 +549,16 @@ public T toObject(Class c) { /** * Converts to a JSON string. - * + * * @return the JSON string. */ public String toJson() { return this.toJson(SerializationFormattingPolicy.NONE); } - + /** * Converts to a JSON string. - * + * * @param formattingPolicy the formatting policy to be used. * @return the JSON string. */ @@ -571,10 +573,10 @@ public String toJson(SerializationFormattingPolicy formattingPolicy) { /** * Gets Simple STRING representation of property bag. - * - * For proper conversion to json and inclusion of the default values + * + * For proper conversion to json and inclusion of the default values * use {@link #toJson()}. - * + * * @return string representation of property bag. */ public String toString() { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java index 1be5f38b07fd..76d0f627c6f8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/HttpConstants.java @@ -252,7 +252,7 @@ public static class Versions { // TODO: FIXME we can use maven plugin for generating a version file // @see // https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven - public static final String SDK_VERSION = "3.4.0"; + public static final String SDK_VERSION = "3.3.1"; public static final String SDK_NAME = "cosmosdb-java-sdk"; } diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index fb70af8fa2e9..25e7233d34c7 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos-parent - 3.4.0 + 3.3.1 pom Microsoft Azure Cosmos DB SQL API @@ -55,7 +55,7 @@ Licensed under the MIT License. com.microsoft.azure azure-cosmos - 3.4.0 + 3.3.1