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
Improve stability of gradle build info extraction #4222
Improve stability of gradle build info extraction #4222
Conversation
While trying to work with the gradle projects from liferay-portal it was observed, that loading failed with an exception. There are two problems: 1. The liferay build provides incomplete implementation of JavaExec, which do not support setting the standard input 2. The generated UnsupportedOperation exception carries a null message, rendering the @nonnull annotation in GradleReport invalid and causing NullPointerExceptions in use sites. Fixes: 1. Setting stdin is changed to be a best-effort operation. It is assumed that, if the setter fails, the access to stdin is not expected and thus does not need to be wired. 2. If a null message is passed into GradleReport, it is replaced with an empty string.
For the liferay-portal I also did:
I'm not a totally happy camper (it is dog slow, blows away my memory, some test classpaths are still broken), but at least I can open the projects. @lkishalmi @sdedic what do you think? |
The exception I observed:
|
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.
These changes seems to be sane.
I still have to look at how the liferay stuff works.
Thanks for the review - the liferay repository can be found here (I noticed, that that information was missing): |
While trying to work with the gradle projects from liferay-portal it
was observed, that loading failed with an exception. There are two
problems:
The liferay build provides incomplete implementation of JavaExec,
which do not support setting the standard input
The generated UnsupportedOperation exception carries a null message,
rendering the @nonnull annotation in GradleReport invalid and
causing NullPointerExceptions in use sites.
Fixes:
Setting stdin is changed to be a best-effort operation. It is
assumed that, if the setter fails, the access to stdin is not
expected and thus does not need to be wired.
If a null message is passed into GradleReport, it is replaced with
an empty string.