You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/11/17 07:25:19 UTC
[groovy] branch master updated: Improve the robustness of closing
resources
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 148d14f Improve the robustness of closing resources
148d14f is described below
commit 148d14fb9c5642fe9a30d16630766470033d702c
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Nov 17 15:24:03 2019 +0800
Improve the robustness of closing resources
---
src/main/java/groovy/lang/GroovyClassLoader.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/groovy/lang/GroovyClassLoader.java b/src/main/java/groovy/lang/GroovyClassLoader.java
index afc52ff..cd44d74 100644
--- a/src/main/java/groovy/lang/GroovyClassLoader.java
+++ b/src/main/java/groovy/lang/GroovyClassLoader.java
@@ -630,8 +630,11 @@ public class GroovyClassLoader extends URLClassLoader {
@Override
public void close() throws IOException {
- super.close();
- delegate.close();
+ try {
+ super.close();
+ } finally {
+ delegate.close();
+ }
}
public long getTimeStamp() {