11// ------------------------------------------------------------------------------
22// Copyright (c) 2017 Microsoft Corporation
3- //
3+ //
44// Permission is hereby granted, free of charge, to any person obtaining a copy
55// of this software and associated documentation files (the "Software"), to deal
66// in the Software without restriction, including without limitation the rights
77// to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
88// copies of the Software, and to permit persons to whom the Software is
99// furnished to do so, subject to the following conditions:
10- //
10+ //
1111// The above copyright notice and this permission notice shall be included in
1212// all copies or substantial portions of the Software.
13- //
13+ //
1414// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1515// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3131import javax .annotation .Nonnull ;
3232import javax .annotation .Nullable ;
3333
34- import static java .util .Collections .emptyMap ;
35-
3634/**
3735 * Serializes and deserializes items from strings into their types
3836 */
3937public interface ISerializer {
4038
4139 /**
4240 * Deserialize an object from the input string
43- *
41+ *
4442 * @param inputString the string that stores the representation of the item
4543 * @param clazz the {@code Class} of the item to be deserialized
4644 * @param <T> the type of the item to be deserialized
4745 * @return the deserialized item from the input string
4846 */
4947 @ Nullable
5048 default <T > T deserializeObject (@ Nonnull final String inputString , @ Nonnull final Class <T > clazz ) {
51- return deserializeObject (inputString , clazz , emptyMap () );
49+ return deserializeObject (inputString , clazz , null );
5250 }
5351
5452 /**
@@ -73,12 +71,12 @@ default <T> T deserializeObject(@Nonnull final String inputString, @Nonnull fina
7371 */
7472 @ Nullable
7573 default <T > T deserializeObject (@ Nonnull final InputStream inputStream , @ Nonnull final Class <T > clazz ) {
76- return deserializeObject (inputStream , clazz , emptyMap () );
74+ return deserializeObject (inputStream , clazz , null );
7775 }
7876
7977 /**
8078 * Deserialize an object from the input stream
81- *
79+ *
8280 * @param inputStream the stream that stores the representation of the item
8381 * @param clazz the {@code Class} of the item to be deserialized
8482 * @param responseHeaders the HTTP response headers
@@ -99,7 +97,7 @@ default <T> T deserializeObject(@Nonnull final InputStream inputStream, @Nonnull
9997 @ SuppressWarnings ("unchecked" )
10098 @ Nullable
10199 default <T > T deserializeObject (@ Nonnull JsonElement jsonElement , @ Nonnull Class <T > clazz ) {
102- return deserializeObject (jsonElement , clazz , emptyMap () );
100+ return deserializeObject (jsonElement , clazz , null );
103101 }
104102
105103 /**
@@ -117,7 +115,7 @@ default <T> T deserializeObject(@Nonnull JsonElement jsonElement, @Nonnull Class
117115
118116 /**
119117 * Serializes an object into a string
120- *
118+ *
121119 * @param serializableObject the object to convert into a string
122120 * @param <T> the type of the item to be serialized
123121 * @return the string representation of that item
0 commit comments