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 — Make AbstractAnalyzeMojo.filterArtifactsByScope() null-safe by elharo · Pull Request #1622 · apache/maven-dependency-plugin

Conversation

@elharo

@elharo elharo commented May 17, 2026

Copy link
Copy Markdown
Contributor

fixes #1619

Sorry, something went wrong.

Uh oh!

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

All reactions
@elharo
Prevent NPE
96f0d7e
@elharo
elharo requested a review from Copilot May 17, 2026 12:40
Copilot started reviewing on behalf of elharo May 17, 2026 12:40
View session
Copilot AI reviewed May 17, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the potential NullPointerException reported in #1619 by making AbstractAnalyzeMojo.filterArtifactsByScope() null-safe when comparing artifact scopes.

Changes:

  • Add java.util.Objects import.
  • Replace artifact.getScope().equals(scope) with Objects.equals(artifact.getScope(), scope) to prevent NPE when getScope() is null.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

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

All reactions
@slawekjaranowski

slawekjaranowski commented May 17, 2026

Copy link
Copy Markdown
Member

Can you update a title of PR - it will be add to release notes, so should be more descriptive

All reactions

Sorry, something went wrong.

Uh oh!

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

@elharo elharo changed the title Prevent NPE Make AbstractAnalyzeMojo.filterArtifactsByScope() null-safe May 17, 2026
slawekjaranowski
slawekjaranowski approved these changes May 17, 2026
View reviewed changes
@elharo
elharo merged commit aea7a64 into master May 17, 2026
21 checks passed

Uh oh!

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

@elharo
elharo deleted the i1619 branch May 17, 2026 21:40
@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot assigned elharo May 17, 2026
@github-actions github-actions Bot added this to the 3.11.0 milestone May 17, 2026
@slawekjaranowski

slawekjaranowski commented May 17, 2026

Copy link
Copy Markdown
Member

@elharo please look at release notes .... your PR are no categorized, also GitHub bot points you about it

https://github.com/apache/maven-dependency-plugin/releases

All reactions

Sorry, something went wrong.

Uh oh!

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

@slawekjaranowski

slawekjaranowski commented May 17, 2026

Copy link
Copy Markdown
Member

Also commit should have similar - the best the same title as PR 😄

Do you look at git log ?

All reactions

Sorry, something went wrong.

Uh oh!

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

@elharo elharo added the bug Something isn't working label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@slawekjaranowski slawekjaranowski slawekjaranowski approved these changes

Uh oh!

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

Assignees

@elharo elharo

Labels

bug Something isn't working

Projects

None yet

Milestone

3.11.0

Development

Successfully merging this pull request may close these issues.

Potential NPE in AbstractAnalyzeMojo.filterArtifactsByScope()

Uh oh!

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

3 participants

@elharo @slawekjaranowski
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.