You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/08/12 18:03:22 UTC
[GitHub] [netbeans] singh-akhilesh opened a new pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
singh-akhilesh opened a new pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307
https://issues.apache.org/jira/browse/NETBEANS-4062
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a change in pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] singh-akhilesh commented on a change in pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on a change in pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307#discussion_r469815848
##########
File path: java/java.source.base/src/org/netbeans/api/java/source/ElementHandle.java
##########
@@ -436,7 +436,7 @@ public boolean signatureEquals (@NonNull final T element) {
* @param kind the {@link ElementKind} of the {@link TypeElement},
* allowed values are {@link ElementKind#CLASS}, {@link ElementKind#INTERFACE},
* {@link ElementKind#ENUM} and {@link ElementKind#ANNOTATION_TYPE}.
- * @param binaryName the class binary name as specified by JLS §13.1
+ * @param binaryName the class binary name as specified by JLS ยง13.1
Review comment:
comment addressed
##########
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:
comment addressed
##########
File path: java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java
##########
@@ -1142,7 +1143,12 @@ public CompilationUnitTree addImports(CompilationUnitTree cut, Set<? extends Ele
el = e.getEnclosingElement();
break;
default:
- assert false : "Illegal element kind: " + e.getKind(); //NOI18N
+ if (TreeShims.isRecord(e)) {
+ if (e.getEnclosingElement().getKind() == ElementKind.PACKAGE) {
+ el = e.getEnclosingElement();
+ }
+ } else
+ assert false : "Illegal element kind: " + e.getKind(); //NOI18N
Review comment:
comment addressed
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a change in pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307#discussion_r469733529
##########
File path: java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java
##########
@@ -1142,7 +1143,12 @@ public CompilationUnitTree addImports(CompilationUnitTree cut, Set<? extends Ele
el = e.getEnclosingElement();
break;
default:
- assert false : "Illegal element kind: " + e.getKind(); //NOI18N
+ if (TreeShims.isRecord(e)) {
+ if (e.getEnclosingElement().getKind() == ElementKind.PACKAGE) {
+ el = e.getEnclosingElement();
+ }
+ } else
+ assert false : "Illegal element kind: " + e.getKind(); //NOI18N
Review comment:
Please use `{}`.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] arvindaprameya commented on pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
arvindaprameya commented on pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307#issuecomment-679832858
Approved, thanks for completing
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] lkishalmi merged pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a change in pull request #2307: [NETBEANS-4062] Fixed issue : import RECORD from other package hint
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2307:
URL: https://github.com/apache/netbeans/pull/2307#discussion_r469732733
##########
File path: java/java.source.base/src/org/netbeans/api/java/source/ElementHandle.java
##########
@@ -436,7 +436,7 @@ public boolean signatureEquals (@NonNull final T element) {
* @param kind the {@link ElementKind} of the {@link TypeElement},
* allowed values are {@link ElementKind#CLASS}, {@link ElementKind#INTERFACE},
* {@link ElementKind#ENUM} and {@link ElementKind#ANNOTATION_TYPE}.
- * @param binaryName the class binary name as specified by JLS §13.1
+ * @param binaryName the class binary name as specified by JLS ยง13.1
Review comment:
I don't think we have to change this.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists