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 — [jsp] Fix false positive in NoClassAttribute for jsp:useBean (#2033) by PRANAV-SINHA-23 · Pull Request #6915 · pmd/pmd

Conversation

@PRANAV-SINHA-23

@PRANAV-SINHA-23 PRANAV-SINHA-23 commented Jul 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Describe the PR

Fixes a false positive in the NoClassAttribute rule where valid <jsp:useBean> tags containing class attributes were being flagged as rule violations.

Changes

  • Updated the XPath query in bestpractices.xml to ignore jsp:useBean elements.
  • Added a test case to NoClassAttribute.xml with expected-problems = 0.

Related issues

  • Fix [jsp] NoClassAttribute: False positive for jsp:useBean #2033

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@PRANAV-SINHA-23
[jsp] Fix false positive in NoClassAttribute for jsp:useBean (pmd#2033)
60c9fa6
@PRANAV-SINHA-23
PRANAV-SINHA-23 force-pushed the fix-jsp-noclassattribute-2033 branch from a26acbf to 60c9fa6 Compare July 29, 2026 14:53
@UncleOwen

UncleOwen commented Jul 29, 2026

Copy link
Copy Markdown
Member

I'm confused. This issue lies dormant for six years, and then we get two pull requests within four days?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukasgraef

lukasgraef commented Jul 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I'm confused. This issue lies dormant for six years, and then we get two pull requests within four days?

I guess it's because of this being the only issue labeled as "good first issue".
But I'm also seeing lots of first-time contributors. Maybe PMD was mentioned somewhere as being a good place to start contributing to open source?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PRANAV-SINHA-23

PRANAV-SINHA-23 commented Aug 3, 2026

Copy link
Copy Markdown
Author

Yeah, I found this through a "good first issue" site while looking for Java projects to contribute to.

I've pushed the XPath fix along with unit tests in NoClassAttribute.xml. Let me know if anything needs tweaking.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen

UncleOwen commented Aug 8, 2026

Copy link
Copy Markdown
Member

Closing as duplicate of #6906

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen UncleOwen closed this Aug 8, 2026
@UncleOwen

UncleOwen commented Aug 8, 2026

Copy link
Copy Markdown
Member

Just wanted to add a "Thank you", even if this PR wasn't merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[jsp] NoClassAttribute: False positive for jsp:useBean

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@PRANAV-SINHA-23 @UncleOwen @lukasgraef
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.