Fix constructor of JsonItemReader to call setExecutionContextName()
Resolves #3681
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
0ecc052190
commit
b9fa9c3786
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2018-2019 the original author or authors.
|
||||
* Copyright 2018-2020 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.
|
||||
@@ -25,6 +25,7 @@ import org.springframework.batch.item.support.AbstractItemCountingItemStreamItem
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* {@link ItemStreamReader} implementation that reads Json objects from a
|
||||
@@ -70,6 +71,7 @@ public class JsonItemReader<T> extends AbstractItemCountingItemStreamItemReader<
|
||||
Assert.notNull(jsonObjectReader, "The json object reader must not be null.");
|
||||
this.resource = resource;
|
||||
this.jsonObjectReader = jsonObjectReader;
|
||||
setExecutionContextName(ClassUtils.getShortName(JsonItemReader.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user