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

Geertjan Wielenga resolved NETBEANS-4400.
-----------------------------------------
    Fix Version/s: 12.1
       Resolution: Fixed

Works now in 12.1, thanks great work!

> Record (preview feature) name refactoring not working. 
> -------------------------------------------------------
>
>                 Key: NETBEANS-4400
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4400
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Editor
>         Environment: OpenJDK Runtime Environment 14-ea+27-1339
>            Reporter: Akhilesh Singh
>            Assignee: Akhilesh Singh
>            Priority: Major
>              Labels: jdk14
>             Fix For: 12.1
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Renaming record name using refactoring(crtl+R) throwing exception. 
> Steps to reproduce:
> 1. Create a class of type record:
> e.g public record RecordNameRefactor(){}
> 2. Try to change/rename the record class name using Refactor->name option or 
> (crtl + R)
>  
> Actual Result :  Throwing exception on UI
> Expected Result : NB UI should allow to rename record
>  
> Stack Trace :
> java.lang.IllegalArgumentException: Invalid node's kind. Supported kinds are 
> BREAK, CLASS, CONTINUE, IDENTIFIER, LABELED_STATEMENT, MEMBER_SELECT, METHOD, 
> TYPE_PARAMETER, VARIABLE
>  at org.netbeans.api.java.source.TreeMaker.setLabelImpl(TreeMaker.java:2996)
>  at org.netbeans.api.java.source.TreeMaker.setLabel(TreeMaker.java:2856)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.renameDeclIfMatch(RenameTransformer.java:435)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitClass(RenameTransformer.java:396)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitClass(RenameTransformer.java:59)
>  at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:824)
>  at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>  at 
> org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.scan(RefactoringVisitor.java:192)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.scan(RenameTransformer.java:87)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.scan(RenameTransformer.java:59)
>  at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>  at 
> jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
>  at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitCompilationUnit(RenameTransformer.java:115)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitCompilationUnit(RenameTransformer.java:59)
>  at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:604)
>  at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>  at 
> org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.scan(RefactoringVisitor.java:192)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameTransformer.scan(RenameTransformer.java:87)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:443)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:408)
>  at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
>  at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
>  at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>  at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
>  at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
>  at 
> org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
>  at 
> org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
>  at 
> org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
>  at 
> org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
>  at 
> org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
>  at 
> org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
>  at 
> org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
>  at 
> org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:317)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:263)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:245)
>  at 
> org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:326)
>  at 
> org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:626)
> [catch] at 
> org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417)
>  at 
> org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401)
>  at 
> org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212)
>  at 
> org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:1063)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>  at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>  at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)
>  



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

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

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

Reply via email to