Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37352

Re: track usage of deprecated classes in our library

Newsgroups comp.lang.java.programmer
Date 2017-08-29 05:19 -0700
References <361824ce-5337-44a8-93a3-05b92139cb30@googlegroups.com>
Message-ID <7073e003-cddc-4e51-817c-7ab22be011c5@googlegroups.com> (permalink)
Subject Re: track usage of deprecated classes in our library
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


On Tuesday, August 29, 2017 at 7:36:21 AM UTC-4, mike wrote:
> 
> Is there a mechanism in java which can accomplish this? Anyone with the experience of this? All input is greatly appreciated.
> 
> //mike

Obviously if you've already compiled a jar and put it out there in the wild without tracking you don't know who's calling what methods.  If you're pushing out a new version, or running your local Java they're somehow connecting to you can add logging as Eric S suggests.

Most APIs would put out at least one version marking methods as deprecated before releasing a new major version to completely eliminate them.  Minor version changes shouldn't be pulling the rug out removing methods but always expect that with a major version number update.

You could also just leave the methods in there telling everyone not to use them but there's really no ill effect if they do it anyway like Component did.
http://docs.oracle.com/javase/8/docs/api/java/awt/Component.html#setSize-int-int-

Deprecated since 1.1 but still exists in 8.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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