New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add METHOD_REF to the list of valid tokens for OperatorCheck #3472

Closed
agcuda opened this Issue Sep 28, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@agcuda
Contributor

agcuda commented Sep 28, 2016

Java 8 introduces the new "Method reference" (::) operator. It is treated e.g. by the Google Style Guide as a "non-assignment operator" and it says that in case of line wrap, the line break should occur before that symbol.

OperatorWrap should accept METHOD_REF in the list of valid tokens, e.g.:

         <module name="OperatorWrap">
             <property name="option" value="NL"/>
             <property name="tokens" value="METHOD_REF, BAND, BOR, BSR ..."/>
         </module>
@agcuda

This comment has been minimized.

Show comment
Hide comment
@agcuda

agcuda Sep 29, 2016

Contributor

One thing I forgot to ask: should METHOD_REF be added to the default list of tokens when "tokens" is not specified?

Contributor

agcuda commented Sep 29, 2016

One thing I forgot to ask: should METHOD_REF be added to the default list of tokens when "tokens" is not specified?

@romani romani added the bug label Sep 29, 2016

@romani romani added this to the 7.2 milestone Sep 29, 2016

agcuda added a commit to agcuda/checkstyle that referenced this issue Sep 30, 2016

romani added a commit that referenced this issue Oct 8, 2016

@romani romani modified the milestones: 7.2, 7.1.2 Oct 8, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 8, 2016

Member

fix is merged.
thanks a lot for your contribution !

Member

romani commented Oct 8, 2016

fix is merged.
thanks a lot for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment