-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added missing @Deprecated annotations #5209
Conversation
@neilcsmith-net this one might be a candidate for NB 17, what do you think? |
@mbien in principle should be safe. Will also add into the sig files / tests. Your call! If we're sure code cleanup changes have no behavioural changes (some of these PR do) then probably safe to merge even this close to branch. Others I would prefer we push until after NB17 is released - some could cause some "fun" with sync PRs? |
@neilcsmith-net ok i haven't considered sig tests causing trouble - good that you mention that. I was only thinking about this PR here with the deprecation annotations - I just removed all other cleanup PRs from milestone 17. Also.. the sig test seems to throw |
@ebarboni you did recently a lot of doc related work and know also a lot more about the NB build than me. You think adding the deprecation annotation would cause any issues anywhere? I think this would be an important PR to be merged. (yes it will cause more compiler warnings, but this is intended.) |
@matthiasblaesing do you see any potential issues caused by bulk adding the deprecated annotation for already in-doc deprecated items? (beside more compiler warnings) I can't come up with a good reason to not merge this for NB17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general ok, but there are problems (see inline comments).
For the point Neil made, this is the result (example for editor.mimelookup
):
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/platform/editor.mimelookup/nbproject/org-netbeans-modules-editor-mimelookup.sig
+++ b/platform/editor.mimelookup/nbproject/org-netbeans-modules-editor-mimelookup.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.58
+#Version 1.59
CLSS public abstract interface !annotation java.lang.Deprecated
anno 0 java.lang.annotation.Documented()
@@ -49,9 +49,13 @@
CLSS public final org.netbeans.api.editor.mimelookup.MimeLookup
meth public <%0 extends java.lang.Object> org.openide.util.Lookup$Result<{%%0}> lookup(org.openide.util.Lookup$Template<{%%0}>)
+ anno 0 java.lang.Deprecated()
meth public <%0 extends java.lang.Object> {%%0} lookup(java.lang.Class<{%%0}>)
+ anno 0 java.lang.Deprecated()
meth public org.netbeans.api.editor.mimelookup.MimeLookup childLookup(java.lang.String)
+ anno 0 java.lang.Deprecated()
meth public static org.netbeans.api.editor.mimelookup.MimeLookup getMimeLookup(java.lang.String)
+ anno 0 java.lang.Deprecated()
meth public static org.openide.util.Lookup getLookup(java.lang.String)
meth public static org.openide.util.Lookup getLookup(org.netbeans.api.editor.mimelookup.MimePath)
supr org.openide.util.Lookup
The anntoation is recorded in the signature, but I don't see a problem with that. Even when branching that should not be an issue. The additional @Deprecated
annotations might cause more merge conflicts, but that would be true for any large scale cleanup. The size here seems doable.
ide/xml.text/src/org/netbeans/modules/xml/text/completion/ElementResultItem.java
Show resolved
Hide resolved
java/java.source.base/src/org/netbeans/modules/java/source/pretty/VeryPretty.java
Outdated
Show resolved
Hide resolved
java/javadoc/src/org/netbeans/modules/javadoc/hints/AddTagFix.java
Outdated
Show resolved
Hide resolved
...actoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java
Outdated
Show resolved
Hide resolved
fixed |
...actoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marked one formatting adjustment. After that please squash everything to one commit.
If you need instructions how to squash please say so I can help.
...n.ddui/src/org/netbeans/modules/j2ee/sun/share/configbean/SunONEDeploymentConfiguration.java
Outdated
Show resolved
Hide resolved
These annotations helpfully to prevent usage of deprecated API. For example: developer can see crossed out method/field name if this item is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. looked through it again and it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me.
These annotations helpfully to prevent usage of deprecated API. For example: developer can see crossed out method/field name if this item is deprecated.