Skip to content

Commit

Permalink
Fix #4332 by widening the scope to all JDKs (#4333)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidburstromspotify committed Nov 25, 2021
1 parent 03f9b97 commit a1150bc
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -7,11 +7,12 @@ fun URL.openSafeStream(): InputStream {
return openConnection()
/*
* Due to https://bugs.openjdk.java.net/browse/JDK-6947916 and https://bugs.openjdk.java.net/browse/JDK-8155607,
* it is necessary to disallow caches to maintain stability on JDK 8. Otherwise, simultaneous invocations of
* Detekt in the same VM can fail spuriously. A similar bug is referenced in
* it is necessary to disallow caches to maintain stability on JDK 8 and 11 (and possibly more).
* Otherwise, simultaneous invocations of Detekt in the same VM can fail spuriously. A similar bug is referenced in
* https://github.com/detekt/detekt/issues/3396. The performance regression is likely unnoticeable.
* Due to https://github.com/detekt/detekt/issues/4332 it is included for all JDKs.
*/
.apply { if (System.getProperty("java.specification.version") == "1.8") useCaches = false }
.apply { useCaches = false }
.getInputStream()
}

Expand Down

0 comments on commit a1150bc

Please sign in to comment.