Results 1 to 3 of 3

Thread: Code Cleanup

  1. #1
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default Code Cleanup

    All

    I am maintaining some code and I have just seen something silly like the below. I corrected of course because we have an unused instance of class A floating around until the garbage collector decides to reclaim it.

    Java Code:
    A a = new A();
    a = (A)...;

    Do any of you know of a tool that can scan source code and detect such things?

    Regards

    Patrick

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,967
    Rep Power
    19

    Default

    That's the sort of thing Findbugs can look for.
    There's a plugin for most, if not all, IDEs.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Replies: 1
    Last Post: 03-04-2010, 11:19 AM
  2. Convert java code to midlet code
    By coldvoice05 in forum New To Java
    Replies: 1
    Last Post: 08-12-2009, 11:14 AM
  3. Convert java code to midlet code
    By coldvoice05 in forum Advanced Java
    Replies: 1
    Last Post: 08-09-2009, 01:21 PM
  4. I need help fixing my code.. or non code?
    By MrHuggykins in forum New To Java
    Replies: 1
    Last Post: 03-19-2008, 10:12 PM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •