Pre Merge pull request !184 from Hacker/N/A
This commit is contained in:
commit
52d289e858
|
|
@ -150,10 +150,8 @@ public class ShiroConfig
|
||||||
protected InputStream getCacheManagerConfigFileInputStream()
|
protected InputStream getCacheManagerConfigFileInputStream()
|
||||||
{
|
{
|
||||||
String configFile = "classpath:ehcache/ehcache-shiro.xml";
|
String configFile = "classpath:ehcache/ehcache-shiro.xml";
|
||||||
InputStream inputStream = null;
|
try (InputStream inputStream = ResourceUtils.getInputStreamForPath(configFile))
|
||||||
try
|
|
||||||
{
|
{
|
||||||
inputStream = ResourceUtils.getInputStreamForPath(configFile);
|
|
||||||
byte[] b = IOUtils.toByteArray(inputStream);
|
byte[] b = IOUtils.toByteArray(inputStream);
|
||||||
InputStream in = new ByteArrayInputStream(b);
|
InputStream in = new ByteArrayInputStream(b);
|
||||||
return in;
|
return in;
|
||||||
|
|
@ -163,10 +161,6 @@ public class ShiroConfig
|
||||||
throw new ConfigurationException(
|
throw new ConfigurationException(
|
||||||
"Unable to obtain input stream for cacheManagerConfigFile [" + configFile + "]", e);
|
"Unable to obtain input stream for cacheManagerConfigFile [" + configFile + "]", e);
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
IOUtils.closeQuietly(inputStream);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue