junichi11 commented on a change in pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307#discussion_r469733272
##########
File path:
java/java.source.base/src/org/netbeans/api/java/source/ElementHandle.java
##########
@@ -634,7 +634,11 @@ public ElementHandle create(ElementKind kind, String...
descriptors) {
}
return new ElementHandle<VariableElement> (kind,
descriptors);
default:
- throw new IllegalArgumentException ();
+ if(kind.name().equals(TreeShims.RECORD) &&
(descriptors.length == 1)) {
+ return new ElementHandle<TypeElement> (kind,
descriptors);
+ }
+ else throw new IllegalArgumentException ();
Review comment:
Please use `{}` (for `else`) and reformat your changes.
----------------------------------------------------------------
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.
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