From 8aaf1d3d5265cb0ef4249d6c190dc1d25a21336a Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Mon, 13 Feb 2023 17:26:34 +0100 Subject: [PATCH] Fix decoding of default job parameter type in extended notation Resolves #4299 --- .../converter/JsonJobParametersConverter.java | 16 +++++++--------- .../JsonJobParametersConverterTests.java | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JsonJobParametersConverter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JsonJobParametersConverter.java index 63060fa24..d51c10b15 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JsonJobParametersConverter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JsonJobParametersConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,11 @@ */ package org.springframework.batch.core.converter; -import java.io.IOException; - -import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.MappingJsonFactory; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.batch.core.JobParameter; import org.springframework.batch.core.JobParameters; -import org.springframework.util.StringUtils; /** * Converter for {@link JobParameters} instances that uses a JSON naming convention for @@ -36,7 +31,7 @@ import org.springframework.util.StringUtils; * where: * *