Cleanup deprecations

This commit is contained in:
Oleg Zhurakousky
2022-09-28 15:48:00 +02:00
parent f2073600ad
commit 130c25f4dc
4 changed files with 0 additions and 74 deletions

View File

@@ -112,12 +112,6 @@
</dependency>
<!-- AVRO -->
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.cloudevents</groupId>
<artifactId>cloudevents-spring</artifactId>
@@ -211,24 +205,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/generated-test-sources</outputDirectory>
<testOutputDirectory>${project.basedir}/target/generated-test-sources</testOutputDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources/avro</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -35,11 +35,6 @@ public class GsonMapper extends JsonMapper {
this.gson = gson;
}
@Override
public <T> T toObject(String json, Type type) {
return this.fromJson(json, type);
}
@Override
public String toString(Object value) {
return this.gson.toJson(value);

View File

@@ -38,11 +38,6 @@ public class JacksonMapper extends JsonMapper {
this.mapper = mapper;
}
@Override
public <T> T toObject(String json, Type type) {
return this.fromJson(json, type);
}
public void configureObjectMapper(Consumer<ObjectMapper> configurer) {
configurer.accept(mapper);
}

View File

@@ -28,8 +28,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.function.context.catalog.FunctionTypeUtils;
import org.springframework.core.ResolvableType;
/**
* @author Dave Syer
* @author Oleg Zhurakousky
@@ -38,32 +36,6 @@ public abstract class JsonMapper {
private static Log logger = LogFactory.getLog(JsonMapper.class);
/**
* @param <T> type for list arguments
* @param json JSON input
* @param type type of list arguments
* @return list of elements
* @deprecated since v2.0 in favor of {@link #toObject(String, Type)}
*/
@Deprecated
<T> List<T> toList(String json, Class<T> type) {
Type actualType = (json.startsWith("[") && !List.class.isAssignableFrom(type))
? ResolvableType.forClassWithGenerics(ArrayList.class, (Class<?>) type).getType()
: type;
return toObject(json, actualType);
}
/**
* @param <T> return type
* @param json JSON input
* @param type type
* @return object
* @since 2.0
* @deprecated since v3.0.4 in favor of {@link #fromJson(Object, Type)}
*/
@Deprecated
abstract <T> T toObject(String json, Type type);
@SuppressWarnings("unchecked")
public <T> T fromJson(Object json, Type type) {
if (json instanceof Collection<?>) {
@@ -110,18 +82,6 @@ public abstract class JsonMapper {
return result;
}
/**
* @param <T> type for list arguments
* @param json JSON input
* @param type type of list arguments
* @return single object
* @deprecated since v2.0 in favor of {@link #toObject(String, Type)}
*/
@Deprecated
<T> T toSingle(String json, Class<T> type) {
return toObject(json, type);
}
public abstract String toString(Object value);
/**