dtrebbien commented on a change in pull request #320: Add the
JavaFixUtilities.isPrimary() utility API
URL: https://github.com/apache/incubator-netbeans/pull/320#discussion_r161416872
##########
File path: spi.java.hints/src/org/netbeans/spi/java/hints/JavaFixUtilities.java
##########
@@ -1337,6 +1336,7 @@ private void rewrite(Tree from, Tree to) {
OPERATOR_PRIORITIES.put(Kind.ARRAY_ACCESS, 1);
OPERATOR_PRIORITIES.put(Kind.METHOD_INVOCATION, 1);
+ OPERATOR_PRIORITIES.put(Kind.MEMBER_REFERENCE, 1);
Review comment:
Hello @lbruun,
Thank you for your review. You are right that this addition affects
requiresParenthesis(). It actually fixes an issue with requiresParenthesis().
I have added a new unit test which breaks without this extra line. Instead
of rewriting `Test::identity` to `Test::toString`, with the line adding
`Kind.MEMBER_REFERENCE` to the `OPERATOR_PRIORITIES` map, it was rewritten to
`(Test)::toString` without.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists