Fix compiler warnings
- Add `@Nullable` where needed - Suppress warnings where appropriate - Add generic type definitions
This commit is contained in:
@@ -153,6 +153,7 @@ public class DefaultJobParametersConverter implements JobParametersConverter {
|
||||
* @param encodedJobParameter the encoded job parameter
|
||||
* @return the decoded job parameter
|
||||
*/
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
protected JobParameter<?> decode(String encodedJobParameter) {
|
||||
String parameterStringValue = parseValue(encodedJobParameter);
|
||||
Class<?> parameterType = parseType(encodedJobParameter);
|
||||
|
||||
@@ -100,6 +100,7 @@ public class JsonJobParametersConverter extends DefaultJobParametersConverter {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
@Override
|
||||
protected JobParameter decode(String encodedJobParameter) {
|
||||
try {
|
||||
|
||||
@@ -212,6 +212,7 @@ public class Jackson2ExecutionContextStringSerializer implements ExecutionContex
|
||||
super(JobParameter.class);
|
||||
}
|
||||
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public JobParameter deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
||||
JsonNode node = parser.readValueAsTree();
|
||||
|
||||
@@ -414,6 +414,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
|
||||
* Convenience method that inserts all parameters from the provided JobParameters.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
private void insertJobParameters(Long executionId, JobParameters jobParameters) {
|
||||
|
||||
if (jobParameters.isEmpty()) {
|
||||
@@ -450,6 +451,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
|
||||
* @param executionId {@link Long} containing the id for the execution.
|
||||
* @return job parameters for the requested execution id
|
||||
*/
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
||||
protected JobParameters getJobParameters(Long executionId) {
|
||||
final Map<String, JobParameter<?>> map = new HashMap<>();
|
||||
RowCallbackHandler handler = rs -> {
|
||||
|
||||
@@ -189,6 +189,7 @@ public class FaultTolerantStepBuilder<I, O> extends SimpleStepBuilder<I, O> {
|
||||
* @param listener the object that has a method configured with listener annotation
|
||||
* @return this for fluent chaining
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public FaultTolerantStepBuilder<I, O> listener(Object listener) {
|
||||
super.listener(listener);
|
||||
@@ -201,7 +202,7 @@ public class FaultTolerantStepBuilder<I, O> extends SimpleStepBuilder<I, O> {
|
||||
if (skipListenerMethods.size() > 0) {
|
||||
StepListenerFactoryBean factory = new StepListenerFactoryBean();
|
||||
factory.setDelegate(listener);
|
||||
skipListeners.add((SkipListener) factory.getObject());
|
||||
skipListeners.add((SkipListener<I, O>) factory.getObject());
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user