-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
NPE during Preconditions validation #2702
Milestone
Comments
so the This is a good catch. |
@mpeddada1 can you look into this bug? |
@vgalloy We've released Jib 2.6.0, which contains a fix for this issue. Thanks for reporting! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment:
Description of the issue:
ImmutableCollections#contains(Object)
throw aNullPointerException
if the argument isnull
. Checking if collection containsnull
will always throw aNullPointerException
Example
Arrays.asList("java").contains(null)
=>false
List.of("java").contains(null)
=>NullPointerException
There is several place where the following pattern is apply :
Preconditions.checkArgument(!entrypoint.contains(null), "entrypoint contains null elements");
Passing an ImmutableCollections as
entrypoint
always failExpected behavior:
No
NullPointerException
exceptionSteps to reproduce:
jib-gradle-plugin
Configuration:Log output:
Additional Information:
I know that not a conventional way to write a
List
, I'm just trying to provided the shorter possible example.The text was updated successfully, but these errors were encountered: