Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache: add null check to pool info collector util
Motivation: 04 Dec 2019 14:38:23 (Frontend-discordia) [] Uncaught exception in thread pool-19-thread-2 java.lang.NullPointerException: null at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) at org.dcache.util.collector.pools.PoolInfoCollectorUtils.mergeLastAccess(PoolInfoCollectorUtils.java:299) ... (yet another undiscovered case where the composed object can be null). Modification: This patch merely adds null checks to the method indicated as the source of this issue. This is not the optimatl solution, but it is one which will not require updating the pools. A better way of dealing with this issue will be introduced in a subsequent patch (master only). Result: Stop this NPE from occurring. Target: master Request: 6.0 Request: 5.2 Request: 5.1 Request: 5.0 Request: 4.2 Bug: dCache/dcache/issues/#5220 Requires-notes: yes Requires-book: no Patch: https://rb.dcache.org/r/12128/ Closes: #5220 Acked-by: Paul
- Loading branch information