Removing deprecated methods from legacy source?

What does one do about deprecated methods in legacy code?
As new versions of the compiler seem to keep supporting the deprecated methods (just offering warnings), there is no reason to invest the resources to update the source? I don't mean methods such as:
java.lang.Thread stop(),
I am thinking of methods such as:
java.awt.Window show();
Will there ever be tangible consequences to not stopping using deprecated methods? Will code with deprecated methods eventually break?
Edited by: dpxqb on May 7, 2010 9:50 PM

There's often an "if it ain't broke, don't fix it" mentality around deprecated methods and classes. Whether that's appropriate or not depends on the individual case. Any deprecated method/class may be removed in any future release, but you have to balance the risk of that happening against the cost of replacing it. Some methods/classes will probably never go away--like Vector, for instance. So there's not much benefit to doing a search/replace on a large codebase.
It depends on your analysis of the various risks and rewards in your particular situation.

Similar Messages

  • [svn:cairngorm3:] 17674: Maven: Remove deprecated PopUpFactory from Flex SDK 4 version.

    Revision: 17674
    Revision: 17674
    Author:   [email protected]
    Date:     2010-09-13 02:20:26 -0700 (Mon, 13 Sep 2010)
    Log Message:
    Maven: Remove deprecated PopUpFactory from Flex SDK 4 version. Use PopUpWrapper.reuse = false instead.
    Modified Paths:
        cairngorm3/trunk/libraries/Popup/pom.xml

    Hi, those technologies are so cool but I failed to run the sample:
    - I am using Maven 3.0.2.
    Runnung mvn build from the latest source code from trunk "....cairngorm3\samples\todo>mvn install". I got the error relating to "unable to transacoding"
    D:\Java\workspaces\misc\cairngorm3\samples\todo\todo_flex\todo_flex_shell\src\ma
    in\flex\com\adobe\txi\todo\shell\skins\ApplicationHeaderSkin.mxml: Error: unable
    to resolve '/assets/todoLogo_big.png' for transcoding
    D:\Java\workspaces\misc\cairngorm3\samples\todo\todo_flex\todo_flex_shell\src\ma
    in\flex\com\adobe\txi\todo\shell\skins\ApplicationHeaderSkin.mxml: Error: Unable
    to transcode /assets/todoLogo_big.png.
    I shift the assets folder to src/main/flex. It got compiled then I can deploy succesfully into Tomcat 6. But I still get empty screen.
    Do I have to do something else like "run db script", "create DB schema" ?
    Note: my adt.jar is from flex_sdk_4.5.0.17855
    Thanks

  • AR Invoices directly from Legacy Sources

    We have legacy sources provide the billing information. The data provided by legacy is pretty complete and we can create the AR invoices with the data provided. Is it a good idea to create customer invoices directly in AR instead of processing the data through Order Management.
    Is there a white paper which suggests this? Does anyone have any idea about this?

    Hi,
    In order to do so, you can use AR open interface tables:
    ra_interface_lines_all: record invoice lines, freight and tax information
    ra_interface_salescredits_all: sales credit information
    ra_interface_distributions_all: record accounting information, if you do not want use receivables autoaccounting.
    You must set up imported batch sources, grouping rules and new interface transaction flexfield contexts. The first one, besides giving your transaction numbering, will define if you are going to send ids or descriptions in interface fields. The second one defines if lines are going to be grouped into one invoice or going to be divided in two or more invoices. The transaction flexfield context is commonly used to link receivables transactions to your legacy system.
    You may want read metalink note 220251.1, it is very useful.
    Regards,
    Ketter Ohnes

  • Importing to Discussion Board Post from legacy source

    Hi All,
    Im sure im not the first to wonder or ask this question but here it goes.
    We have recently moved out intranet to SharePoint 2013. We have rebuilt from the ground up using many of the out of box solutions as well as some third party apps and web parts however these is one aspect that is stumping us.
    On our old intranet we use a SQL based forum/discussion board package which has
    about ten years worth of posts, surveys, Q&As etc. As it is SQL based it is very easy for use to query and pull this legacy data however
    we cannot find a way to import into SharePoint. We do not expect to import it all but would like to import at leas the last 12 months of submitted
    data with at least basic fields like Title, description/content, tags, post date and post user. We do not mind other metadata being striped out like voting etc.
    We have dug deep into the SharePoint database files to see if we can directly insert but
    it is very complex and almost certainly not supported. We was also hoping for a discussion board data list view so we could bulk cut and paste. This is not ideal but would at least be a better option than manually inserting each post.
    Does anybody have an idea where to start if at all possible. 
    Mark

    Won't keep me logged in,
    This is a server problem. In other words, "don't adjust your dial!"
    spinning balls,
    All this means is that the rendering is slowed down by something in the design of the website. If it is a thread with over 500 posts, you probably will have difficulty viewing it, unless you have a high speed internet connection with low latency, enough hard disk space to cache the files, and/or view threads in tree mode. To use Tree mode, go to My Settings, and select Tree View under Topic Page View in the General SEttings.
    Bad Request
    Sometimes will happen if your internet service provider is behind a backbone with significant peering issues.
    So how big is your hard drive?
    How much free disk space is there?
    Have you tried to empty the browser cache?
    Does this issue happen with short threads as well as long ones?
    Do you have any system modification software such as Speed Download, PthHelmet, or other browser enhancement software?
    Are you sure all your software is known to be Snow Leopard compatible?
    See these two pages about compatibility:
    http://snowleopard.wikidot.com/
    http://www.macintouch.com/specialreports/snowleopard/slcompat.html

  • How to remove payment method from iTunes account ?

    I want to update my apps but it keeps sending me to my payment method all my apps are free ? How can I remove my payment method off of my iTunes account ?

    Follow the instructions here >  iTunes Store: About authorization and deauthorization

  • How I make deprecated method in JB4

    Hi, i make deprecated method like this:
    * @deprecated
    public String fillCharsToLimit(String value, int limit, char chr, boolean fromFirst) {
    value = value.trim();
    if (value == null || (value.length() == 0 && limit <= 0))
    ;//do st
    (in project properties i enable Show deprecations)
    I except that compiler say me warning.
    Its ignore deprecation in my code, but when I use deprecated method from JDK all is OK, only my method no why?
    Thanks DK

    You don't get a deprecation warning if the deprecated class or method and the code that uses the deprecated class or method are compiled at the same time. See Bug 4216683 http://developer.java.sun.com/developer/bugParade/bugs/4216683.html for details.

  • 1.4 deprecated methods

    Are there any methods that have been deprecated as of JDK 1.3 that have been removed in JDK 1.4 / 1.4.2? I can't find a list anywhere. Generally, do we need to worry about Sun completely removing deprecated methods?

    Woohoo! I wonder how long before the move to 1.5 happens.<thinks about how wonderful moving data structures
    consisting of 6 nested hashtables into generics will be/>
    *splort*
    Exactly! I've already thought about that. But, probably no worries--the contract has ended. What is supposed to be the last release is supposed to happen in a couple of days (once they fix a problem with a data file the subcontractor gave us). Our code to parse their text file (one time thing as part of a build) didn't have much error checking, so the error wasn't found until the testers tried to run something else. Then, the first person debugging it tried to find a latent bug in our code (spend a few days on it). They called me up today (I'm on another project now) to see if I could find anything, because the other guy was out for two days. As soon as I saw where the error occurred, I looked at the data files and quickly found that they were corrupted. Our code is still fragile, but if the data file is fixed, that should be sufficient (might as well keep this part fragile, especially if the contract is over--everything else in the code is fragile, too).

  • This static method cannot hide the instance method from...

    What means the error message "This static method cannot hide the instance method from Referee"?
    Referee.java is a interface. I implemented it in the class RefereeMyName.java and made a method in that class to be static. Thats why I received that error message.
    But can't I use static methods when I have implemented a interface in that class? I want to have a Player.java class which I want to access RefereeMyName.getTarget(). I cannot use a instance instead because I wouldn't receive a valid return value then (RefereeMyName is the client class).
    What is the solution?

    Hi,
    Well i do not think that you can do that b'cos that way you are not giving the same signature for the method as that exists in the interface. I do not know how other way it can be done but if something urgent for you then you can remove that method from that interface and only define in the class.
    Regards,
    Shishank

  • Removing audio folders from browser

    I have an old sound effects folder that contains nothing.
    I added it by dragging it to the pane. As time has gone on I no longer use these effects and wish to remove the folder.
    It doesn't seem to be as easy to remove it as it was to add it.
    Thanks
    Uploaded with plasq's Skitch!

    Just guessing, but I think you have to remove the folder from its source. You might want to try closing iMovie, then going to HD/Library/Audio/Apple Loops/Apple and temporily moving the iLife Special Effects folder to your desktop. Be careful not to delete it. Then open iMovie and see if the folder still shows in the media pane. Then you can move the iLife Special Effects folder back into the Apple Loops/Apple folder where it was. If you try it, let us know how it worked.

  • Invoke beanshell methods from java

    Hello
    I'm learning beanshell and using it to write scripts that are ran in JDK 6.
    My question is how to invok beanshell methods from java source codes.
    My codes is:
    import javax.script.*;
    public class InvokeFunctions {
    public static void main (String[] args)throws ScriptException, NoSuchMethodException
    ScriptEngineManager sem = new ScriptEngineManager();
    ScriptEngine bshEngine = sem.getEngineByName("beanshell");
    String script = "public void sayHello()"+"{print (\"sayHello() is a method in bsh script\");}";
    bshEngine.eval(script);
    Invocable inbshEngine = (Invocable)bshEngine;
    inbshEngine.invokeFunction("sayHello");
    I defined a method "sayHello()" using beanshell, but i just can't invoke it in Java.
    I got an error msg said:
    Exception in thread "main" java.lang.IllegalAccessError: tried to access method bsh.NameSpace.getThis(Lbsh/Interpreter;)Lbsh/This; from class bsh.engine.BshScriptEngine
    Any one has any idea about it?
    Thanks

    Look at the Javadoc documentation of IllegalAccessError. It says:
    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
    Maybe recompiling all your sources (make sure you delete all existing *.class files) will help?

  • Approved method of removing memory card from reader

    In the past, I have just removed the memory card from the reader when I was finished with it, but I have since read that that is not good practice. The method mentioned in my book is "Click the tiny Eject button next to the card's name in the Source list, and then remove the card from the reader". The problem with that is that I have no such Eject button in my Source list, and no card name appears there, either. First of all, is it wrong to just remove the memory card without any preliminaries? Second, what do you do when there is no Eject button and no card name?

    <but there is a link reading "CANON,,,DC>
    what do you mean by "link"?
    <....icons for 12 files appears>
    are the 12 files =12photos or 12 folders?
    if you see the photos, (usually DSC000143.jpg or similar) then create an empty folder on the desktop and drag & drop theses 12 photos on the empty folder. And that's it you now have uploaded the pics from card to computer.
    Eject the card reader, drag to trash.
    Then you can launch iPhoto.
    Drag & drop that empty folder over iPhoto et vloia all your pics are imported to iPhoto.
    You can now delete the empty folder to the trash.
    or it's up to you where you want to put them. In iPhoto or anywhere else.
    and that's it!
    michel

  • How To Remove Empty Node From Source XML

    Hi,
    How can I remove an empty node from the source xml in a XSLT mapping.
    For e.g. If the source xml is like:
    <SRC>
    <Node1>SAP</Node2>
    <Node2/>
    <Node3>XI</Node3>
    </SRC>
    Then the xml should become:
    <SRC>
    <Node1>SAP</Node2>
    <Node3>XI</Node3>
    </SRC>
    I need to do this because the output of my XSLT mapping is showing blank spaces for each blank node.
    Thanks,
    Abhishek.

    Use <xsl:if>
    Or else you may find different options here
    http://www.dpawson.co.uk/xsl/sect2/N3328.html#d4804e304
    Regards,
    Prateek

  • How to extract data from legacy system to source file

    Hi can anyone tell me the procedute to copy data from legacy system to source files....this data needs to be moved to base tables
    can any one tell me the procedure and any sample code i,e any example
    Thanks & Regards
    Krish

    You should post your thread to ...:
    http://forums.oracle.com/forums/forum.jspa?forumID=183
    providing all necessary info......!!!!
    Greetings...
    Sim

  • How to remove the recursion from the following method

    Hi All,
    Can u plz help me to remove the recursion from the following method.
    The problem here is that recursion cann't be removed easily here as there is no any end condition.
    hopefully waiting for the help....
    Reema.
    private FilterStatement processCustomExpressions(FilterStatement statement,
              DistinguishedName tenant, LdapDao ldapDao)
              throws NameNotFoundException,
              LDAPServerException, NamingException {
         HashMap relMap = new HashMap();
         HashMap replaceMap = new HashMap();
         Vector relVec = null;
              FilterSubExpressions expressions = statement.getExpressions();
              FilterPartIterator it = (FilterPartIterator)expressions.iterator();
              while (it.hasNext()) {
                   FilterExpression e = (FilterExpression)it.next();
                   if (e instanceof CustomExpression) {
                        CustomExpression ce = (CustomExpression)e;
                        try {
                             FilterExpression fe = ce.createExpression();
                             if (fe instanceof RelationshipExpression) {
                                  RelationshipExpression re = (RelationshipExpression)fe;
                                  it.replace(re);
                                  relVec = (Vector) relMap.get(re.name);
                                  if(relVec == null) {
                                       relVec = new Vector();
                                       relVec.add(re);
                                  }else {
                                       relVec.add(re);
                                       it.remove();
                                  relMap.put(re.name, relVec);
                             } else if (fe instanceof SystemExpression) {
         SystemExpression se = (SystemExpression)fe;
         it.replace(se);
                        } catch (FilterEvaluationException fe) {
                             traceLogger.exception(Level.DEBUG_MIN, this,
                                  "processCustomExpressions(" + statement.toString() + ")", fe);
                             SystemLog.getInstance().logError(this,
                                  "processCustomExpressions(" + statement.toString() + ")", fe.getMessage());
              replaceRelationshipExpressions(statement, tenant, ldapDao, relMap);
              processContainerBasedExpressions(tenant, ldapDao, relMap, replaceMap);
              FilterSubStatements statements = statement.getStatements();
              FilterStatement temp = null;
              if (statements.size() != 0) {          
                   FilterPartIterator iter = (FilterPartIterator)statements.iterator();
                   while (iter.hasNext()) {
                        temp = (FilterStatement)iter.next();
                        temp = processCustomExpressions(temp, tenant, ldapDao);
                        iter.replace(temp);
              if(!replaceMap.isEmpty())
                   return replaceContainerBasedExpressions(statement, replaceMap);
              return statement;
         }

    I think one of the reasons that noone will reply to your posting is that you take it a bit too easy. First of all, please use the "code" button to format your code listings. Then it will look like this (see below) and everybody can at least read it!
    private FilterStatement processCustomExpressions(FilterStatement statement,
                                                    DistinguishedName tenant,
                                                    LdapDao ldapDao)
            throws NameNotFoundException, LDAPServerException, NamingException {
        HashMap relMap = new HashMap();
        HashMap replaceMap = new HashMap();
        Vector relVec = null;
        FilterSubExpressions expressions = statement.getExpressions();
        FilterPartIterator it = (FilterPartIterator) expressions.iterator();
        while (it.hasNext()) {
            FilterExpression e = (FilterExpression) it.next();
            if (e instanceof CustomExpression) {
                CustomExpression ce = (CustomExpression) e;
                try {
                    FilterExpression fe = ce.createExpression();
                    if (fe instanceof RelationshipExpression) {
                        RelationshipExpression re = (RelationshipExpression) fe;
                        it.replace(re);
                        relVec = (Vector) relMap.get(re.name);
                        if (relVec == null) {
                            relVec = new Vector();
                            relVec.add(re);
                        else {
                            relVec.add(re);
                            it.remove();
                        relMap.put(re.name, relVec);
                    else if (fe instanceof SystemExpression) {
                        SystemExpression se = (SystemExpression) fe;
                        it.replace(se);
                catch (FilterEvaluationException fe) {
                    traceLogger.exception(Level.DEBUG_MIN, this,
                                "processCustomExpressions("
                                + statement.toString()
                                + ")",
                            fe);
                    SystemLog.getInstance().logError(this,
                                "processCustomExpressions("
                                + statement.toString()
                                + ")",
                            fe.getMessage());
        replaceRelationshipExpressions(statement, tenant, ldapDao, relMap);
        processContainerBasedExpressions(tenant, ldapDao, relMap, replaceMap);
        FilterSubStatements statements = statement.getStatements();
        FilterStatement temp = null;
        if (statements.size() != 0) {
            FilterPartIterator iter = (FilterPartIterator) statements.iterator();
            while (iter.hasNext()) {
                temp = (FilterStatement) iter.next();
                temp = processCustomExpressions(temp, tenant, ldapDao);
                iter.replace(temp);
        if (!replaceMap.isEmpty())
            return replaceContainerBasedExpressions(statement, replaceMap);
        return statement;
    }Second, when you cannot understand your own code anymore, simplify it! As far as I can see, there are two "main" processes (i.e. loops) in your method, where the second one calls the method recursively. Split the method into two. Furthermore, write a third method that processes the iterated elements and call that method from out of the loops.
    I did'nt analyse your method and have no idea what it does at all. I'm merely telling my first impression.
    Good luck.

  • I purchased gems from a game and didnt get them because my method was declined i want to remove the order so i dont pay for it and so i can update my other apps and i want to remove the method i will be thankfull if someone help me

    i purchased gems from a game and didnt get them because my method was declined i want to remove the order so i dont pay for it and so i can update my other apps and i want to remove the method i will be thankfull if someone help me without updating the payment method i cant update my apps in my iphone i want to remove the method and remove the order i dont want it

    Click here and ask the iTunes Store staff for assistance.
    (125742)

Maybe you are looking for

  • How to delete a photo album from iPhone using a new hard drive & a later version of iTunes

    I'm using the same computer but with a new hard drive and a later version of iTunes. I previously loaded a photo folder from my PC to my iPhone, but I inadvertently did it twice, giving each folder a different name -- "Photo Library," and "Widget Pho

  • Alter table reaching the max number of char 4000, CLOB? NCLOB?

    I have a column is a table defined as a VARCHAR2(4000) I try to alter the table alter table sybaapc MODIFY  SYBAAPC_EXTRACURRICULAR VARCHAR2(5000)but it give me this error ORA-00910: specified length too long for its datatype I want the users to be a

  • CNN com does not play the video, just the commercial

    I had this problem with the last version of flash in Firfox.  I installed a older version of flash and it works fine.  The commercial plays to the end and then just stops.  Normaly it proceeds to the video news reel then the next commercail and so on

  • Location of Desktop Innerpage in PCD

    Hi there, we are running an EP60 SP16 portal and creating a whole new Portal Desktop with new Default Frameworkpage and Desktop Innerpage. For starters I looked at the Default Frameworkpage located in pcd:portal_content/com.sap.pct/every_user/general

  • How can I manually add photos on my iPad to photostream?

    I must be missing something obvious because I can't find a way to drag existing photos from my iPad library to the photostream. These doesn't seem to be a path. I am hoping I don't have to email myself all the photos just to get them to my MacBook. T