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

Antonio Vieiro updated NETBEANS-225:
------------------------------------
    Description: 
For commit

{noformat}
commit 603d64ca26e9c0852831bebeec0f7e55857a7797
Merge: 460608ee8 32fc0eaa5
Date:   Tue Dec 19 20:49:41 2017 +0100
{noformat}

To reproduce:

In the project explorer select a Java file, copy it and paste it again. 
Refactor/rename appears. Enter another file name.
*NOTE*: The file was correctly renamed, but the class name within the file was 
wrong (i.e.: refactor/rename did not change the class name).

Exception:

{noformat}
com.sun.tools.javac.code.ClassFinder$BadClassFile: bad source file: 
WikiDevFaqDownload.java
  file does not contain class net.vieiro.nbwiki.WikiDevFaqDownload
  Please remove or make sure it appears in the correct subdirectory of the 
sourcepath.
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:856)
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:783)
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.lambda$new$0(JavaCompiler.java:343)
        at 
jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:352)
        at 
jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:800)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:1107)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:541)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        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 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck.computeExpressionsState(NPECheck.java:498)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck.methodInvocation(NPECheck.java:305)
        at jdk.internal.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[catch] at 
org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:317)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:798)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:90)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.runAndAdd(HintsInvoker.java:657)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:676)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:433)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1454)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:248)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:206)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        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 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:701)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:245)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:228)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:193)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:166)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65)
        at 
org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        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:2033)
{noformat}



  was:
For commit

{noformat}
commit 603d64ca26e9c0852831bebeec0f7e55857a7797
Merge: 460608ee8 32fc0eaa5
Date:   Tue Dec 19 20:49:41 2017 +0100
{noformat}

To reproduce:

In the project explorer select a Java file, copy it and paste it again. 
Refactor/rename appears. Enter another file name.

Exception:

{noformat}
com.sun.tools.javac.code.ClassFinder$BadClassFile: bad source file: 
WikiDevFaqDownload.java
  file does not contain class net.vieiro.nbwiki.WikiDevFaqDownload
  Please remove or make sure it appears in the correct subdirectory of the 
sourcepath.
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:856)
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:783)
        at 
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.lambda$new$0(JavaCompiler.java:343)
        at 
jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:352)
        at 
jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
        at 
jdk.compiler/com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:800)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:1107)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:541)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        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 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck.computeExpressionsState(NPECheck.java:498)
        at 
org.netbeans.modules.java.hints.bugs.NPECheck.methodInvocation(NPECheck.java:305)
        at jdk.internal.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[catch] at 
org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:317)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:798)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:90)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.runAndAdd(HintsInvoker.java:657)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:676)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:433)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1454)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:248)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:206)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
        at 
jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at 
org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
        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 
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
        at 
jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:701)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:245)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:228)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:193)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:166)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65)
        at 
org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        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:2033)
{noformat}



> [jdk-javac] Bad source file after refactor/rename
> -------------------------------------------------
>
>                 Key: NETBEANS-225
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-225
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - JDK Problems
>            Reporter: Antonio Vieiro
>              Labels: jdk-javac
>
> For commit
> {noformat}
> commit 603d64ca26e9c0852831bebeec0f7e55857a7797
> Merge: 460608ee8 32fc0eaa5
> Date:   Tue Dec 19 20:49:41 2017 +0100
> {noformat}
> To reproduce:
> In the project explorer select a Java file, copy it and paste it again. 
> Refactor/rename appears. Enter another file name.
> *NOTE*: The file was correctly renamed, but the class name within the file 
> was wrong (i.e.: refactor/rename did not change the class name).
> Exception:
> {noformat}
> com.sun.tools.javac.code.ClassFinder$BadClassFile: bad source file: 
> WikiDevFaqDownload.java
>   file does not contain class net.vieiro.nbwiki.WikiDevFaqDownload
>   Please remove or make sure it appears in the correct subdirectory of the 
> sourcepath.
>       at 
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:856)
>       at 
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:783)
>       at 
> jdk.compiler/com.sun.tools.javac.main.JavaCompiler.lambda$new$0(JavaCompiler.java:343)
>       at 
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:352)
>       at 
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
>       at 
> jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
>       at 
> jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
>       at 
> jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
>       at 
> jdk.compiler/com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:800)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:1107)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:541)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:541)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
>       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 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:620)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck.computeExpressionsState(NPECheck.java:498)
>       at 
> org.netbeans.modules.java.hints.bugs.NPECheck.methodInvocation(NPECheck.java:305)
>       at jdk.internal.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> [catch] at 
> org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:317)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:798)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:90)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.runAndAdd(HintsInvoker.java:657)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:676)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:433)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1454)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:248)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:206)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610)
>       at 
> jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
>       at 
> org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
>       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 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
>       at 
> jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:701)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:245)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:228)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:193)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:166)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114)
>       at 
> org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65)
>       at 
> org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
>       at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
>       at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>       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:2033)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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