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

NPE on getRepoTags() #199

Closed
outofcoffee opened this issue Aug 10, 2016 · 2 comments
Closed

NPE on getRepoTags() #199

outofcoffee opened this issue Aug 10, 2016 · 2 comments

Comments

@outofcoffee
Copy link
Contributor

outofcoffee commented Aug 10, 2016

This is similar to the issue fixed in cd15bec.

A NPE can be thrown when checking disk space when getRepoTags() is null. This seems to occur when an image is in the following format:

<registry name>/<repo>/<image>

...but hasn't been pushed to the registry yet (or at least the local image store does not have a record of it happening).

Stacktrace:

2016-08-10 23:07:29.864 [Test worker] WARN  o.testcontainers.DockerClientFactory - [] Encountered and ignored error while checking disk space
java.lang.NullPointerException: null
    at java.util.Objects.requireNonNull(Objects.java:203) ~[na:1.8.0_65]
    at java.util.Arrays$ArrayList.<init>(Arrays.java:3813) ~[na:1.8.0_65]
    at java.util.Arrays.asList(Arrays.java:3800) ~[na:1.8.0_65]
    at org.testcontainers.DockerClientFactory.lambda$checkDiskSpace$0(DockerClientFactory.java:146) [testcontainers-cd15becf1ef907ad41843554aef5924a9a1b1b3b.jar:na]
    at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[na:1.8.0_65]
    at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1351) ~[na:1.8.0_65]
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) ~[na:1.8.0_65]
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) ~[na:1.8.0_65]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[na:1.8.0_65]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_65]
    at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[na:1.8.0_65]
    at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[na:1.8.0_65]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_65]
    at java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:449) ~[na:1.8.0_65]
    at org.testcontainers.DockerClientFactory.checkDiskSpace(DockerClientFactory.java:146) [testcontainers-cd15becf1ef907ad41843554aef5924a9a1b1b3b.jar:na]
    at org.testcontainers.DockerClientFactory.checkDiskSpaceAndHandleExceptions(DockerClientFactory.java:131) [testcontainers-cd15becf1ef907ad41843554aef5924a9a1b1b3b.jar:na]
    at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:103) [testcontainers-cd15becf1ef907ad41843554aef5924a9a1b1b3b.jar:na]
    at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:74) [testcontainers-cd15becf1ef907ad41843554aef5924a9a1b1b3b.jar:na]

Offending line

@kunickiaj
Copy link

I already submitted a pull request for this #201

@outofcoffee
Copy link
Contributor Author

Fixed by #201

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

No branches or pull requests

2 participants