mirror of
https://github.com/lightbend/config.git
synced 2025-02-15 22:00:52 +08:00
buffer the input stream for loading properties
This commit is contained in:
parent
b1b2403a5d
commit
d5fba4b8a7
@ -1,5 +1,6 @@
|
|||||||
package com.typesafe.config.impl;
|
package com.typesafe.config.impl;
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -50,6 +51,7 @@ final class Loader {
|
|||||||
InputStream stream = null;
|
InputStream stream = null;
|
||||||
try {
|
try {
|
||||||
stream = url.openStream();
|
stream = url.openStream();
|
||||||
|
stream = new BufferedInputStream(stream);
|
||||||
props.load(stream);
|
props.load(stream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ConfigException.IO(origin, "failed to open url", e);
|
throw new ConfigException.IO(origin, "failed to open url", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user