AvoidThreadGroup Violations in PMD 4.2.6

  • Randy Doffing
    Randy Doffing

    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

    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.