Skip to content

Missing comma in StepExecution#getSummary #5025

Description

@piaopiao-zheng-tomo

Bug description
There is a formatting issue in the getSummary() method of StepExecution.java (spring-batch-core/src/main/java/org/springframework/batch/core/step/StepExecution.java). One of the fields in the formatted string is missing a comma separator, which leads to inconsistent or hard-to-read summaries when inspecting logs or debugging.

Location:
File: spring-batch-core/src/main/java/org/springframework/batch/core/step/StepExecution.java
Method: getSummary()

Code snippet:

public String getSummary() {
    return super.toString() + String.format(
        ", name=%s, status=%s, exitStatus=%s, readCount=%d, filterCount=%d, writeCount=%d readSkipCount=%d, writeSkipCount=%d"
        + ", processSkipCount=%d, commitCount=%d, rollbackCount=%d",
        stepName, status, exitStatus.getExitCode(), readCount, filterCount, writeCount, readSkipCount,
        writeSkipCount, processSkipCount, commitCount, rollbackCount);
}

Notice the missing comma between writeCount=%d and readSkipCount=%d.

Expected behavior
A comma should be added between these two fields for consistent output:

writeCount=%d, readSkipCount=%d

Minimal Complete Reproducible example
Call getSummary() on a StepExecution instance and observe the output formatting.

Environment
All environments are affected, as this is a formatting issue in the core string representation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions