jcabi / jcabi-manifests

Java library for convenient reading of MANIFEST.MF files available in classpath
https://manifests.jcabi.com
Other
60 stars 22 forks source link

#333-jcabi/jcabi com.jcabi.manifests.Manifests NoClassDefFoundError #47

Closed janenicholson closed 2 years ago

janenicholson commented 2 years ago

fix ArrayIndexOutOfBoundsException leading to com.jcabi.manifests.Manifests NoClassDefFoundError

When an error occurs loading the manifest, a piece of static code that's trying to report the error instead throws an exception during a catch block. This prevents loading of the class, and results in NoClassDefFoundError errors which are hard to diagnose, as the class is present in the jar file.

The real error encountered by users is described in the exception that is being caught, but this is never reported due to the exception thrown during the attempt to report.

This issue was reported against the parent project at https://github.com/jcabi/jcabi/issues/333

yegor256 commented 2 years ago

@rultor merge

rultor commented 2 years ago

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 2 years ago

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 7min)

yegor256 commented 2 years ago

@janenicholson thanks!

yegor256 commented 2 years ago

@janenicholson I released version 1.2 (with your changes), feel free to use it

thomasbao12 commented 2 years ago

Can you link the release for 1.2? I don't see it

yegor256 commented 2 years ago

@thomasbao12 here: https://github.com/jcabi/jcabi-manifests/releases/tag/1.2 The release didn't go entire correct, that's why the JAR is in Maven Central, but not here. Sorry.