Add a default constructor to StepExecutionRequest
Without a default constructor, a StepExecutionRequest instance cannot be deserialized using Jackson. This commit adds a (private) default constructor to fix the issue. Resolves BATCH-2732
This commit is contained in:
committed by
Michael Minella
parent
5730f380e2
commit
1f900ee83b
@@ -1,17 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2018 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.integration.partition;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Class encapsulating information required to request a step execution in
|
||||
* a remote partitioning setup.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
public class StepExecutionRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Long stepExecutionId;
|
||||
private Long stepExecutionId;
|
||||
|
||||
private final String stepName;
|
||||
private String stepName;
|
||||
|
||||
private final Long jobExecutionId;
|
||||
private Long jobExecutionId;
|
||||
|
||||
private StepExecutionRequest() {
|
||||
//For Jackson deserialization
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link StepExecutionRequest} instance.
|
||||
* @param stepName the name of the step to execute
|
||||
* @param jobExecutionId the id of the job execution
|
||||
* @param stepExecutionId the id of the step execution
|
||||
*/
|
||||
public StepExecutionRequest(String stepName, Long jobExecutionId, Long stepExecutionId) {
|
||||
this.stepName = stepName;
|
||||
this.jobExecutionId = jobExecutionId;
|
||||
|
||||
Reference in New Issue
Block a user