GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] ConstructorCallsOverridableMethod false positive when calling super method · Issue #1718 · pmd/pmd

[java] ConstructorCallsOverridableMethod false positive when calling super method #1718

New issue
Copy link
New issue
Copy link
Closed
#4101
Closed
[java] ConstructorCallsOverridableMethod false positive when calling super method#1718
#4101
Copy link
Labels
a:false-positivePMD flags a piece of code that is not problematic
Milestone
6.50.0

Description

@Andy-2639
Andy-2639
opened on Mar 13, 2019
Issue body actions

Affects PMD Version: 6.12.0
Rule: ConstructorCallsOverridableMethod
Running PMD through: PMD Eclipse Plugin version 4.1.0

Code Sample demonstrating the issue:

public class A {
    public void doA() {}
}

public class B extends A {
    public B() {
        super.doA();  // <-- PMD: Overridable method 'doA' called during object construction
    }

    @Override
    public void doA() {
        throw new UnsupportedOperationException();
    }
}

Description:

In B's constructor, PMD reports that an overridable method is called. However, it is a super method call. So I think it is a false positive.

Reacted by Artur Bosch and mqus

Activity

  1. jsotuyod
    added
    a:false-positivePMD flags a piece of code that is not problematic
    on Apr 1, 2019
  2. adangel
    added this to the 6.50.0 milestone on Sep 29, 2022
  3. adangel
    added a commit that references this issue on Sep 29, 2022

    [doc] Update release notes (pmd#1718, pmd#2348)

    defb0cd
  4. adangel
    closed this as completedin #4101on Sep 30, 2022
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-positivePMD flags a piece of code that is not problematic

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.50.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.