From: SourceForge.net <no...@so...> - 2007-10-16 08:36:33
|
Bugs item #1627113, was opened at 2007-01-03 16:22 Message generated for change (Comment added) made by spackers You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=725495&aid=1627113&group_id=132863 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Rob Hafernik (robhafernik) >Assigned to: spackers (spackers) Summary: bug in net.sourceforge.sqlexplorer.util.ImageUtil.java Initial Comment: Hi, This isn't the usual sort of bug, because I didn't notice that something wasn't working by using the product, but I found a bug while browsing the code. I was trying to learn about developing for Eclipse by browsing your code and I noticed that the disposeImage() method in ImageUtil is broken. It always disposes of the image (meaning that the cache is meaningless) and never checks the value of the handleCount stored in the _imageCount hash. The handleCount can actually go negative, it seems to me. Also, the getImage() method should probably set the handleCount to 1 every time it allocates a new Image, regardless of what it finds in the _imageCount hash, just to make sure the cache stays coherent. Probably, no one ever noticed this bug because getImage() will always get a new copy of the image if it has been disposed. This bug will therefore only show up as reduced performance and not an actual bug. Of course, I'm just browsing your code and I may be full of excrement. I don't know Eclipse very well and it's certianly possible that I've misread something. Still, a glance at disposeImage() by someone who knows what they're doing would probably be prudent. Sorry, I would just get permission and fix this code myself, but I'm not really qualified to be a submitter on an Eclipse project yet. ---------------------------------------------------------------------- >Comment By: spackers (spackers) Date: 2007-10-16 08:36 Message: Logged In: YES user_id=1335081 Originator: NO Well spotted! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=725495&aid=1627113&group_id=132863 |