Menu

#1255 UseUtilityClass false positive with Exceptions

PMD-5.2.1
closed
None
PMD
4-Minor
Bug
5.1.3
2014-11-03
2014-09-03
No

This class is identified as needing to be converted to a utility class, but it's a custom exception that is intended to be thrown and caught:

public class MyException extends RuntimeException {

    private static final long serialVersionUID = 2854498759784815062L;

    public MyException() {
        super(foo());
    }

    protected static String foo() {
        return "foo";
    }
}

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-11-02
    • summary: UseUtilityClass false positive --> UseUtilityClass false positive with Exceptions
    • status: open --> in-progress
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-next
     
  • Andreas Dangel

    Andreas Dangel - 2014-11-03
    • status: in-progress --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.