-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix #358, #352 NPE on site generation caused by null returned by deprecated MavenProject.getDependencyArtifacts() #373
Conversation
…precated MavenProject.getDependencyArtifacts()
…precated MavenProject.getDependencyArtifacts()
@tomred-net hi, sound a nice patch. But i can't accept it like this, the format of files has changed, and should not. thanks |
@tomred-net can you make the change requested by @tchemit ? |
@mistic100 happy to make the change but I can't see what format has changed beyond the changes required for the bug fix. @tchemit can you be specific about what formatting you are unhappy with? |
@mistic100 @tchemit I have tabbed a couple of lines to make it look like it did before. Let me know if there is anything else you would like updated. |
files mode was changed |
…-generation-fork # Conflicts: # src/main/java/org/codehaus/mojo/license/AbstractThirdPartyReportMojo.java # src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java # src/main/java/org/codehaus/mojo/license/AggregateDownloadLicensesMojo.java # src/main/java/org/codehaus/mojo/license/DownloadLicensesMojo.java # src/main/java/org/codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java # src/main/java/org/codehaus/mojo/license/utils/MojoHelper.java
This fix resolves the NPE by adding a check for the null and replacing with an empty set in the case where the deprecated MavenProject.getDependencyArtifacts() returns null.
It should be noted that this PR does not resolve the fact that MavenProject.getDependencyArtifacts() is deprecated. This PR also does not suggest an alternative source of non-transitive dependencies.
This PR puts in a check and returns the code and accompanying test case to a runnable state. Unfortunately many artifact related method on MavenProject are now deprecated but without reference to an alternative source of functionality offered.