Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] Make Varargs trigger ArrayIsStoredDirectly #965

Merged
merged 1 commit into from
Mar 10, 2018
Merged

[java] Make Varargs trigger ArrayIsStoredDirectly #965

merged 1 commit into from
Mar 10, 2018

Conversation

stephengroat
Copy link
Contributor

@stephengroat stephengroat commented Mar 9, 2018

Before submitting a PR, please check that:

  • The PR is submitted against master. The PMD team will merge back to support branches as needed.
  • mvn test passes.
  • mvn checkstyle:check passes. Check this for more info

PR Description:

fixes #963

@jsotuyod jsotuyod added this to the 6.2.0 milestone Mar 9, 2018
@jsotuyod jsotuyod self-assigned this Mar 9, 2018
@jsotuyod
Copy link
Member

jsotuyod commented Mar 9, 2018

@stephengroat amazing! Thanks and congrats on your first contribution!

@stephengroat
Copy link
Contributor Author

@jsotuyod kind words and great encouragement for new contributors! a well run project!

Copy link
Member

@oowekyala oowekyala left a comment

Choose a reason for hiding this comment

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

Nicely done.

I think isArray should return true when isVarargs is true though. If it doesn't, then on varargs parameters, isArray() == false but param.getType().isArray() == true, which could be surprising. That would make one less check for type resolution too. I'd merge this PR as-is and worry about that inconsistency after we merge #912 and #945. There are already too many PRs making changes to this component

@jsotuyod jsotuyod merged commit 264403b into pmd:master Mar 10, 2018
@stephengroat stephengroat deleted the varargs-arraystoredirect branch March 10, 2018 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[java] ArrayIsStoredDirectly not triggered from variadic functions
3 participants