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
{{ message }}
Repository navigation
"Move Field" refactoring into interface causes syntax error #9798
Move refactoring will not proceed because it refuses to move member to parent class, suggests Pull Up instead.
Pull Up moves field to parent interface but dialog warns that original default access member is not public.
After pull-up there is a valid syntax error that = is expected. IMO this is not a bug. Java interfaces cannot declare non-static fields. When the member is pulled-up it is implicitly made public static final and therefore must have a value assigned to it.
In the original issue description, you don't state what the exact syntax error is or why you think it's incorrect. What's the expected result you'd consider correct? My response was based on the info provided and what I could see of real behavior.
If you're referencing an existing test case, please provide a link and don't make me chase it down.
Activity
wrprice commentedon Nov 14, 2026
On NB32-rc3:
After pull-up there is a valid syntax error that
=is expected. IMO this is not a bug. Java interfaces cannot declare non-static fields. When the member is pulled-up it is implicitly madepublic static finaland therefore must have a value assigned to it.jherkel commentedon Nov 14, 2026
If you check test for Move refactoring you can see use case.
wrprice commentedon Nov 14, 2026
In the original issue description, you don't state what the exact syntax error is or why you think it's incorrect. What's the expected result you'd consider correct? My response was based on the info provided and what I could see of real behavior.
If you're referencing an existing test case, please provide a link and don't make me chase it down.
wrprice commentedon Nov 14, 2026
Chased it down anyway, looks like referencing PR #9802