chaiyongqiang created FLINK-14871:
-------------------------------------
Summary: Better formatter of toString method for StateTransition
Key: FLINK-14871
URL:
https://issues.apache.org/jira/browse/FLINK-14871 Project: Flink
Issue Type: Improvement
Components: Library / CEP
Affects Versions: 1.9.1
Reporter: chaiyongqiang
Attachments: 屏幕快照 2019-11-20 下午3.27.43.png
The toString method in StateTransition does not have a good format.
{code:java}
@Override
public String toString() {
return new StringBuilder()
.append("StateTransition(")
.append(action).append(", ")
.append("from ").append(sourceState.getName())
.append("to ").append(targetState.getName())
.append(condition != null ? ", with condition)" : ")")
.toString();
}
{code}
The problem is there's no separator between `sourceState.getName()` and "to " which leads to a bad format like the attachment showing.
A blank space is more friendly.
{code:java}
@Override
public String toString() {
return new StringBuilder()
.append("StateTransition(")
.append(action).append(", ")
.append("from ").append(sourceState.getName())
.append(" to ").append(targetState.getName())
.append(condition != null ? ", with condition)" : ")")
.toString();
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)