wrprice commented on code in PR #9802:
URL: https://github.com/apache/netbeans/pull/9802#discussion_r4603336115
##########
java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/Bundle.properties:
##########
@@ -79,6 +79,7 @@ ERR_PullUp_MemberAlreadyExists=Member "{0}" already exists in
the target type.
ERR_CannotPullupDuplicateMembers=Cannot pull up two members with the same
signature.
ERR_PullupNonPublicToInterface=Member "{0}" is being moved to interface, but
is not public.
ERR_PullupStaticToInterface=Member "{0}" cannot be pulled up to interface, it
is static.
+ERR_PullupNonNotInitializedToInterface=Member "{0}" cannot be pulled up to
interface, it is not initialized.
Review Comment:
Yes, my "not a bug" comment in the issue was based on the scant info posted
there; your meaning was more clear once I found this PR.
If the result here were to say, essentially, "you can't do that because the
field is not static final" (consider, even if there is an initializer) then if
the developer makes that change in the current location they'd also see the
(new) compiler error if it also wasn't uninitialized. Both fixes they'd make
themselves as opt-in, then the refactoring op can be retried.
To your point about not protecting someone from all mistakes, it could focus
on `static` and still allow the move to occur even if it wasn't `final` and let
there be new compiler errors at a distance anywhere it's mutated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists