RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v4]

Matthias Baesken mbaesken at openjdk.org
Tue Oct 4 08:00:21 UTC 2022


> We noticed that with certain jar file input, jdeps runs into the following exception, this happens with jdk11, 17 and 20.
> 
> jdeps.exe --multi-release 11 --module-path . --inverse --package com.sap.nw.performance.supa.client test.jar
> 
> Inverse transitive dependences matching packages [com.sap.nw.performance.supa.client]
> Exception in thread "main" java.util.NoSuchElementException: No value present
>         at java.base/java.util.Optional.get(Optional.java:148)
>         at jdk.jdeps/com.sun.tools.jdeps.InverseDepsAnalyzer.lambda$inverseDependences$2(InverseDepsAnalyzer.java:150)
>         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
>         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
>         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
>         at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>         at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
>         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
> 
> So an additional  check might be a good idea.

Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:

  enhance test

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/10300/files
  - new: https://git.openjdk.org/jdk/pull/10300/files/3c2f0938..701c7628

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10300&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10300&range=02-03

  Stats: 13 lines in 1 file changed: 11 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/10300.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10300/head:pull/10300

PR: https://git.openjdk.org/jdk/pull/10300


More information about the core-libs-dev mailing list