File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 48
48
import org .infinispan .commands .module .ModuleCommandFactory ;
49
49
import org .infinispan .commons .util .FileLookup ;
50
50
import org .infinispan .commons .util .FileLookupFactory ;
51
+ import org .infinispan .commons .util .Util ;
51
52
import org .infinispan .configuration .cache .CacheMode ;
52
53
import org .infinispan .configuration .cache .Configuration ;
53
54
import org .infinispan .configuration .cache .ConfigurationBuilder ;
@@ -434,8 +435,8 @@ protected EmbeddedCacheManager createCacheManager(
434
435
new ClassLoaderService .Work <EmbeddedCacheManager >() {
435
436
@ Override
436
437
public EmbeddedCacheManager doWork (ClassLoader classLoader ) {
438
+ InputStream is = null ;
437
439
try {
438
- InputStream is ;
439
440
is = fileLookup .lookupFile ( configLoc , classLoader );
440
441
if ( is == null ) {
441
442
// when it's not a user-provided configuration file, it might be a default configuration file,
@@ -463,6 +464,9 @@ public EmbeddedCacheManager doWork(ClassLoader classLoader) {
463
464
catch (IOException e ) {
464
465
throw new CacheException ( "Unable to create default cache manager" , e );
465
466
}
467
+ finally {
468
+ Util .close ( is );
469
+ }
466
470
}
467
471
468
472
}
You can’t perform that action at this time.
0 commit comments