comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Deprecated methods: how important to fix? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95a8cdae1df78d61 ========================================================================== TOPIC: Deprecated methods: how important to fix? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95a8cdae1df78d61 ========================================================================== == 1 of 2 == Date: Tues, Aug 24 2004 12:17 pm From: kaeli <[EMAIL PROTECTED]> Hey all, I just inherited some code for an applet. I have never made an applet. Yay me. Anyway, it's old code that has a bug, and I need to find and fix the bug. I figured as long as I was doing that, I should get the code to use java 1.4 (it was made with something way before this) since all our browers here tend to have 1.4xx. So, I compiled it, and fixed most of the deprecated stuff, but I'm wondering about these: stop() in java.lang.Thread has been deprecated action(java.awt.Event,java.lang.Object) in java.awt.Component has been deprecated handleEvent(java.awt.Event) in java.awt.Component has been deprecated I've never made an applet, as I said, nor used the AWT components. I've never done threads. How hard are these to re-do, and should I bother? I'm only supposed to be fixing a bug totally unrelated to these (at least as far as I know they're unrelated...). If YOU inherited the code, would you fix it or leave it? TIA -- -- ~kaeli~ All I ask is the chance to prove that money cannot make me happy. http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace == 2 of 2 == Date: Tues, Aug 24 2004 12:54 pm From: Paul Lutus <[EMAIL PROTECTED]> kaeli wrote: > > Hey all, > > I just inherited some code for an applet. I have never made an applet. Yay > me. > Anyway, it's old code that has a bug, and I need to find and fix the bug. > I figured as long as I was doing that, I should get the code to use java > 1.4 (it was made with something way before this) since all our browers > here tend to have 1.4xx. > So, I compiled it, and fixed most of the deprecated stuff, but I'm > wondering about these: > > stop() in java.lang.Thread has been deprecated This one is very, very important to change. Stopping a thread can be dangerous, and, of all deprecated methods, this one is at the top of the list. Preferred: Have the thread watch for a stop-flag and stop itself when it detects the flag. Never try to stop a thread externally. > action(java.awt.Event,java.lang.Object) in java.awt.Component has been > deprecated > handleEvent(java.awt.Event) in java.awt.Component has been deprecated These are important to change, and even more important not to use in new code. But they are not as important as Thread.stop(). > I've never made an applet, as I said, nor used the AWT components. I've > never done threads. > How hard are these to re-do, and should I bother? I'm only supposed to be > fixing a bug totally unrelated to these (at least as far as I know they're > unrelated...). > If YOU inherited the code, would you fix it or leave it? I would fix it. In fact, I have gone through many of my old programs, reworking the action and event handling code. If the code only has a past, don't bother. If the code has a future, take it more seriously. -- Paul Lutus http://www.arachnoid.com ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/prefs Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BCfwlB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/kumpulan/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
