Skip to content

[java] Renderers output wrong class qualified name for nested classes #4904

@cowwoc

Description

@cowwoc

Affects PMD Version: 7.0.0

Rule: AbstractClassWithoutAbstractMethod

Description: The AbstractClassWithoutAbstractMethod reports the wrong class

Code Sample demonstrating the issue:

package com.github.cowwoc.lumina;

public final class Form
{
	public static abstract class Property    // <----- Rule is triggering on this line
	{
		// ...
	}

	// ...
}

(https://github.com/cowwoc/lumina/blob/main/java/src/main/java/com/github/cowwoc/lumina/Form.java#L38)

Expected outcome: Violation message with class name com.github.cowwoc.lumina.Form.Property
Actual outcome: [INFO] PMD Failure: com.github.cowwoc.lumina.Property:38 Rule:AbstractClassWithoutAbstractMethod Priority:3 This abstract class does not have any abstract methods.

Running PMD through: Maven

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bugPMD crashes or fails to analyse a file.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions