aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/core/SpiLoadUtil.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-05-29 00:17:20 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-06-23 15:55:18 +0200
commit0bbedd092a1f0f506d106943b4b400c7986c5f36 (patch)
treef07bdd4d4c2d69bd7e204d8e15e99209106aee3b /src/utils/lombok/core/SpiLoadUtil.java
parent22ac024abb3680b298bef78052f5a13239513b29 (diff)
downloadlombok-0bbedd092a1f0f506d106943b4b400c7986c5f36.tar.gz
lombok-0bbedd092a1f0f506d106943b4b400c7986c5f36.tar.bz2
lombok-0bbedd092a1f0f506d106943b4b400c7986c5f36.zip
[build] rewriting the build system
Diffstat (limited to 'src/utils/lombok/core/SpiLoadUtil.java')
-rw-r--r--src/utils/lombok/core/SpiLoadUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/lombok/core/SpiLoadUtil.java b/src/utils/lombok/core/SpiLoadUtil.java
index e685acd6..0feb7f12 100644
--- a/src/utils/lombok/core/SpiLoadUtil.java
+++ b/src/utils/lombok/core/SpiLoadUtil.java
@@ -129,9 +129,10 @@ public class SpiLoadUtil {
private static void readServicesFromUrl(Collection<String> list, URL url) throws IOException {
InputStream in = url.openStream();
+ BufferedReader r = null;
try {
if (in == null) return;
- BufferedReader r = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+ r = new BufferedReader(new InputStreamReader(in, "UTF-8"));
while (true) {
String line = r.readLine();
if (line == null) break;
@@ -143,6 +144,7 @@ public class SpiLoadUtil {
}
} finally {
try {
+ if (r != null) r.close();
if (in != null) in.close();
} catch (Throwable ignore) {}
}