codestyle issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

codestyle issue

RocMarshal
Why are there unnecessary ';' lines in the code style of any files? For example, line 41 of the file Flink / Flink Runtime / SRC / main / Java / org / Apache / Flink / Runtime / client / clientutils.java.
Thanks.




 





 
Reply | Threaded
Open this post in threaded view
|

Re: codestyle issue

Xintong Song
Because it is a Enum. For java Enums, you need to first define its values,
followed by a semicolon, then the methods. In this case, there's no values
because we are only using Enum to keep ClientUtils singleton, but you still
need the semicolon before defining methods. You could see that removing
that semicolon will cause compiling errors.

Thank you~

Xintong Song



On Tue, Mar 31, 2020 at 12:50 AM flinker <[hidden email]> wrote:

> Why are there unnecessary ';' lines in the code style of any files? For
> example, line 41 of the file Flink / Flink Runtime / SRC / main / Java /
> org / Apache / Flink / Runtime / client / clientutils.java.
> Thanks.
>
>
>
>
>
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re:Re: codestyle issue

RocMarshal
Concise and comprehensive.<br/>Thank you.
At 2020-03-31 09:45:35, "Xintong Song" <[hidden email]> wrote:

>Because it is a Enum. For java Enums, you need to first define its values,
>followed by a semicolon, then the methods. In this case, there's no values
>because we are only using Enum to keep ClientUtils singleton, but you still
>need the semicolon before defining methods. You could see that removing
>that semicolon will cause compiling errors.
>
>Thank you~
>
>Xintong Song
>
>
>
>On Tue, Mar 31, 2020 at 12:50 AM flinker <[hidden email]> wrote:
>
>> Why are there unnecessary ';' lines in the code style of any files? For
>> example, line 41 of the file Flink / Flink Runtime / SRC / main / Java /
>> org / Apache / Flink / Runtime / client / clientutils.java.
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>