You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Akhilesh Singh (Jira)" <ji...@apache.org> on 2020/02/03 05:27:00 UTC

[jira] [Updated] (NETBEANS-3786) Hint "add imports" is not in a right place(Record -JDK 14)

     [ https://issues.apache.org/jira/browse/NETBEANS-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akhilesh Singh updated NETBEANS-3786:
-------------------------------------
    Description: 
Write below code snippet on editor and use hint "*add import*" for List interface.

public record Test(String s, int i, int j){
 static List list= null;
}

Actual Result:

Import statement comes at the end of record body. This change shows compile time error on editor.

 

Excepted Result

Import statement should come after package declaration or before start of record body.

 

Note : This issue occurs only when there is no other import statement available or declared previously. 

  was:
Below code snippet throwing null pointer exception while generating override method using hints.

record MyRecrod(int i) implements Runnable {

}


> Hint "add imports" is not in a right place(Record -JDK 14)
> ----------------------------------------------------------
>
>                 Key: NETBEANS-3786
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3786
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Editor
>         Environment: 14-ea; OpenJDK 64-Bit Server VM 14-ea+27-1339
>            Reporter: Akhilesh Singh
>            Assignee: Akhilesh Singh
>            Priority: Major
>              Labels: jdk14, pull-request-available
>
> Write below code snippet on editor and use hint "*add import*" for List interface.
> public record Test(String s, int i, int j){
>  static List list= null;
> }
> Actual Result:
> Import statement comes at the end of record body. This change shows compile time error on editor.
>  
> Excepted Result
> Import statement should come after package declaration or before start of record body.
>  
> Note : This issue occurs only when there is no other import statement available or declared previously. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists