Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37351
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: track usage of deprecated classes in our library |
| Date | 2017-08-29 08:09 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <oo3la3$4sv$1@dont-email.me> (permalink) |
| References | <361824ce-5337-44a8-93a3-05b92139cb30@googlegroups.com> |
On 8/29/2017 7:36 AM, mike wrote:
> Hi
>
> We have quite a number of users of our public API. We have deprecated a great number of our methods since they are inefficient and error prone. New ones are already in place. But as you all know we cannot just remove the old since we do not know if they are used.
>
> So we need to know which deprecated methods that are still called and hopefully provide ip and username so we can contact them to assist in replacing to new method.
>
> Is there a mechanism in java which can accomplish this? Anyone with the experience of this? All input is greatly appreciated.
There's nothing (as far as I know) that records the actual use
of a deprecated method. The compiler will issue a warning if the
method call appears somewhere, but if the user ignores the warning
and runs the code anyhow -- well, then it's just ordinary Java code.
Also, the presence of a method call in source doesn't prove that the
method will actually be called; perhaps your deprecated method is
only called from one of *their* deprecated methods ...
All I can think of is that you might release a new version of
your library, putting a call to deprecatedMethodWasUsed() at the
start of each deprecated method. dMWU() could then make some kind
of record of the use, or even "phone home" with the news. (I am not
a lawyer, but I suggest you consult one before inserting "phone home"
actions; you might easily cross the line into becoming spyware if you
do that sort of thing without the client organization's permission.)
--
esosman@comcast-dot-net.invalid
Twelve hundred forty days to go.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
track usage of deprecated classes in our library mike <mikaelpetterson@hotmail.com> - 2017-08-29 04:36 -0700 Re: track usage of deprecated classes in our library Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-08-29 08:09 -0400 Re: track usage of deprecated classes in our library Eric Douglas <e.d.programmer@gmail.com> - 2017-08-29 05:19 -0700 Re: track usage of deprecated classes in our library Arne Vajhøj <arne@vajhoej.dk> - 2017-08-29 20:41 -0400 Re: track usage of deprecated classes in our library lewbloch@gmail.com - 2017-08-30 14:17 -0700
csiph-web