jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1868245 - in /jackrabbit/branches/2.18: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
Date Thu, 10 Oct 2019 12:34:42 GMT
Author: reschke
Date: Thu Oct 10 12:34:42 2019
New Revision: 1868245

URL: http://svn.apache.org/viewvc?rev=1868245&view=rev
Log:
JCR-4485: InternalValueFactory.create(File) does not close input stream (merged r1867170 into
2.18)

Modified:
    jackrabbit/branches/2.18/   (props changed)
    jackrabbit/branches/2.18/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java

Propchange: jackrabbit/branches/2.18/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 10 12:34:42 2019
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,1856855,1856969,1857631,1857721,1858564,1858566,1859534,1859563,1859633,1860118,1860123,1860645,1861773,1861777-1861778,1861781,1861786,1862283,1862783,1862805,1863196,1863222,1863384,1865525,1865748,1865991,1866234,1866280,1866448,1866728,1867128,1867130,1867133
+/jackrabbit/trunk:1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,1856855,1856969,1857631,1857721,1858564,1858566,1859534,1859563,1859633,1860118,1860123,1860645,1861773,1861777-1861778,1861781,1861786,1862283,1862783,1862805,1863196,1863222,1863384,1865525,1865748,1865991,1866234,1866280,1866448,1866728,1867128,1867130,1867133,1867170

Modified: jackrabbit/branches/2.18/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.18/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java?rev=1868245&r1=1868244&r2=1868245&view=diff
==============================================================================
--- jackrabbit/branches/2.18/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
(original)
+++ jackrabbit/branches/2.18/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
Thu Oct 10 12:34:42 2019
@@ -110,11 +110,8 @@ public final class InternalValueFactory
     }
 
     public QValue create(File value) throws RepositoryException, IOException {
-        InputStream in = new FileInputStream(value);
-        if (store == null) {
-            return InternalValue.createTemporary(in);
-        } else {
-            return InternalValue.create(in, store);
+        try (InputStream in = new FileInputStream(value)) {
+            return create(in);
         }
     }
 



Mime
View raw message