You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/11/20 07:50:00 UTC
[jira] [Updated] (FLINK-14871) Better formatter of toString method
for StateTransition
[ https://issues.apache.org/jira/browse/FLINK-14871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-14871:
-----------------------------------
Labels: pull-request-available (was: )
> 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
> Priority: Major
> Labels: pull-request-available
> 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)