You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now go to test59.Test59Java.foo(String, Integer) and hit Alt+Shift+C to invoke Change Method Signature refactoring. Add a new parameter, type String, name another, default value null.
Hit OK.
I get the following exception:
eclipse.buildId=4.14.0.I20191210-0610
java.version=1.8.0_202
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=it_IT
Command-line arguments: -os win32 -ws win32 -arch x86_64 -data file:/D:/ws/rolling/DCS-SHOP-trunk/
org.eclipse.jdt.ui
Error
Thu Feb 27 12:47:08 CET 2020
Internal Error
java.lang.Exception: Cannot update found node: nodeType=8; {
java.lang.Object t;
}
[105, 50] in [Working copy] Test59.groovy [in test59 [in src [in TestGroovyNull]]]
package test59
import groovy.transform.CompileStatic
class Test59
void bar():
{
def t = new Test59Java()
t.foo('a', 1)
}
at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor$NullOccurrenceUpdate.updateNode(ChangeSignatureProcessor.java:2779)
at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.createChangeManager(ChangeSignatureProcessor.java:1436)
at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.checkFinalConditions(ChangeSignatureProcessor.java:863)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:226)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:86)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:122)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:210)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
If you hit Continue, the Groovy class is not updated and a compilation error on it arises, of course.
The text was updated successfully, but these errors were encountered:
When JDT searches for the method's references, any occurrences in Groovy sources are not represented in the Java AST and so the covering node is used (block statement in this case).
Groovy would need to provide AST for the method statements for this to work. At the moment only a minimal amount of AST is provided in method bodies to support declaration of local variables.
Consider this Java class:
and this Groovy class:
Now go to
test59.Test59Java.foo(String, Integer)
and hit Alt+Shift+C to invoke Change Method Signature refactoring. Add a new parameter, typeString
, nameanother
, default valuenull
.Hit OK.
I get the following exception:
If you hit Continue, the Groovy class is not updated and a compilation error on it arises, of course.
The text was updated successfully, but these errors were encountered: