[ 
https://issues.apache.org/jira/browse/FLINK-14871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chesnay Schepler closed FLINK-14871.
------------------------------------
    Fix Version/s: 1.10.0
       Resolution: Fixed

master: 051ff0393ac8fc3b4a9e98a18f410b7071af3393

> 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
>            Assignee: chaiyongqiang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>         Attachments: 屏幕快照 2019-11-20 下午3.27.43.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to