You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2022/03/01 23:08:49 UTC

[sling-org-apache-sling-feature] branch nocache created (now b38c594)

This is an automated email from the ASF dual-hosted git repository.

pauls pushed a change to branch nocache
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature.git.


      at b38c594  Set use caches to false in IOUtils get jar to work around a possible jvm issue

This branch includes the following new commits:

     new b38c594  Set use caches to false in IOUtils get jar to work around a possible jvm issue

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-feature] 01/01: Set use caches to false in IOUtils get jar to work around a possible jvm issue

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pauls pushed a commit to branch nocache
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature.git

commit b38c5949a82e19c7c39cd1a6437197c2e68d53a0
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Wed Mar 2 00:08:36 2022 +0100

    Set use caches to false in IOUtils get jar to work around a possible jvm issue
---
 src/main/java/org/apache/sling/feature/io/IOUtils.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/feature/io/IOUtils.java b/src/main/java/org/apache/sling/feature/io/IOUtils.java
index 9dd9f33..5ef9b36 100644
--- a/src/main/java/org/apache/sling/feature/io/IOUtils.java
+++ b/src/main/java/org/apache/sling/feature/io/IOUtils.java
@@ -236,7 +236,9 @@ public class IOUtils {
             else if (!url.getPath().endsWith("!/")) {
                 targetURL = new URL(toURLString(url) + "!/");
             }
-            return ((JarURLConnection) targetURL.openConnection()).getJarFile();
+            JarURLConnection connection = (JarURLConnection) targetURL.openConnection();
+            connection.setUseCaches(false);
+            return connection.getJarFile();
         } catch (IOException ex) {
             File file = getFileFromURL(url, cache, tmpDir);
             if (file != null) {