junichi11 commented on code in PR #7618:
URL: https://github.com/apache/netbeans/pull/7618#discussion_r1706418937
##########
php/php.blade/src/org/netbeans/modules/php/blade/editor/BladeBracesMatcher.java:
##########
@@ -104,35 +104,21 @@ public int[] findMatches() throws InterruptedException,
BadLocationException {
}
String tokenText = originToken.getText();
- switch (currentDirection) {
- case CURLY_START_TO_END -> {
- return findCloseTag();
- }
- case CURLY_END_TO_START -> {
- return findOpenTag();
- }
- case START_TO_END -> {
- return findDirectiveEnd(tokenText);
- }
- case CUSTOM_START_TO_END -> {
- return findCustomDirectiveEnd(tokenText);
- }
- case END_TO_START -> {
- return findOriginForDirectiveEnd(tokenText);
- }
- }
-
- return null;
+ return switch (currentDirection) {
+ case CURLY_START_TO_END -> findCloseTag();
+ case CURLY_END_TO_START -> findOpenTag();
+ case START_TO_END -> findDirectiveEnd(tokenText);
+ case CUSTOM_START_TO_END -> findCustomDirectiveEnd(tokenText);
+ case END_TO_START -> findOriginForDirectiveEnd(tokenText);
+ default -> null;
Review Comment:
Please don't use `default` because `currentDirection` is the enum (Add all
cases).
See: https://github.com/apache/netbeans/pull/7618#discussion_r1699881123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
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