Menu

AvoidThreadGroup Violations in PMD 4.2.6

2011-10-27
2015-08-11
  • Randy Doffing

    Randy Doffing - 2011-10-27

    Our site recently moved from PMD 4.2.5 to 4.2.6. We are now receiving
    AvoidThreadGroup violations in various places. Our rulesets or our code hasn't
    changed in these areas.
    The following are a couple of code samples that are being flagged as
    AvoidThreadGroup voilations:
    1) throw new java.io.InvalidClassException(...);
    2) new java.text.SimpleDateFormat("dd/MM/yyyyhhmm");
    3) new java.beans.PropertyChangeEvent(...);

     
  • Randy Doffing

    Randy Doffing - 2011-10-31

    A co-worker of mine discovered that by removing the package path in the class
    reference - and moving it to an import -- these PMD violations went away. That
    is the work-around that we have implemented in our projects.

     
  • Shahbaz Akhter

    Shahbaz Akhter - 2015-08-11

    That workaround works but i have same class name (different packages) used in a separate class, where i am creating objects in both the classes, and this issue is bugging , please help to get around with this. Thanks in advance

     

    Last edit: Shahbaz Akhter 2015-08-11

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.