Hi Brad,

Am Mittwoch, den 11.09.2019, 13:46 -0600 schrieb Brad Walker:
> Let's say that I've cleaned up all references to a deprecated method.
> 
> Now I want to remove the deprecated method since no one is using it.
> 
> Don't I have to update the interface definition? And if so, how does one go
> about doing this?

as in all important cases: It depends.

If the module does not export the class that holds the method, there
could be modules, that have an implementation depedency on the module.
Grepping through the codebase should give you a feeling, whether or not
the class is imported somewhere.

If the module exports the class, don't remove the method if it works.
Deprecated methods don't need to be removed if there is no reason to. A
reason would be, that method is broken or the module is going through a
API break anyway.

>From your PM to me you are describing a different case:

   I'm tyring to cleanup some old code that deals with Generics..

   For example, in the following file
   ./profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/ClassDump.java

   You will find the following method..
       public List /*<Field>*/ getFields() {

   Since this method is public, if I change it there will be an interface 
update needed, correct?

   Can you tell me what I need to do to implement a change like this?

_That_ is a different matter and there is only one try to get it right.
Adding generics to method signatures in java is generally save,
changing them is not.

So once you can just add the generic, increase the module spec version
and be done.

In the above sample however it looks as if there was a good reason to
have it, maybe Jan Lahoda can help with the reasoning.

HTH

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-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