Skip to content

[java] AbstractClassWithoutAnyMethod: False Positive on derived abstract class #6965

Closed

Description

@mebigfatguy

Affects PMD Version:
7.23.0
Rule: AbstractClassWithoutAnyMethod
Description:

Class is indeed an empty abstract class that derives from another abstract class that does have abstract methods

Code Sample demonstrating the issue:

public abstract class BaseFooType {
       public abstract Foo getFoo();
}

public abstract SpecificBoo extends BaseFooType {
}

Expected outcome:
no report
cant change to non abstract, nor can you add a private ctor
PMD reports a violation at line ..., but that's wrong. That's a false positive.

Running PMD through: Ant

Activity

  1. added
    a:false-positive
    on Aug 10, 2026
  2. changed the title [-][java] AbstractClassWithoutAnyMethod fp on derived abstract class[/-] [+][java] AbstractClassWithoutAnyMethod False Positive on derived abstract class[/+] on Aug 10, 2026
  3. UncleOwen commented on Aug 10, 2026

    @UncleOwen
    Member

    Sounds like a duplicate of #1237

  4. AzazelSensei commented on Aug 13, 2026

    @AzazelSensei
    Contributor

    Opened #6972 for this.

  5. added this to the 7.27.0 milestone on Aug 15, 2026
  6. added a commit that references this issue on Aug 15, 2026
    41f4fb2
  7. changed the title [-][java] AbstractClassWithoutAnyMethod False Positive on derived abstract class[/-] [+][java] AbstractClassWithoutAnyMethod: False Positive on derived abstract class[/+] on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:false-positive

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions