Skip to content

Bugfix provided by #4225 needs wider scope #4332

@davidburstromspotify

Description

@davidburstromspotify

Expected Behavior

#4225 fixed the issue for JDK 1.8, but it turns out it's required also for JDK 11

Observed Behavior

The dreaded zip file closed is still present in JDK 11

Caused by: io.gitlab.arturbosch.detekt.api.Config$InvalidConfigurationError: Provided configuration file is invalid: Structure must be from type Map<String,Any>!
        at io.gitlab.arturbosch.detekt.core.config.YamlConfig$Companion.load(YamlConfig.kt:85)
        at io.gitlab.arturbosch.detekt.core.config.YamlConfig$Companion.loadResource(YamlConfig.kt:64)
Caused by: org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Stream closed
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:218)
        at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:176)
Caused by: java.io.IOException: Stream closed
        at java.base/java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:143)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
        at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)

Steps to Reproduce

Run Detekt in parallel within the same VM.

Your Environment

  • Version of detekt used: 1.19.0-RC2
  • Version of Gradle used (if applicable): 7.3
  • Operating System and version: macOS Monterrey

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions