Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw Inside Finally #4596

Closed
QiAnXinCodeSafe opened this issue Dec 29, 2020 · 0 comments · Fixed by #4606
Closed

Throw Inside Finally #4596

QiAnXinCodeSafe opened this issue Dec 29, 2020 · 0 comments · Fixed by #4606
Assignees

Comments

@QiAnXinCodeSafe
Copy link

QiAnXinCodeSafe commented Dec 29, 2020

Any exceptions thrown from the try or catch segment are eliminated when an exception is thrown ina finally block

} finally {
if (rlock != null) {
rlock.release();
rlock = null;
}
if (fis != null) {
fis.close();
fis = null;
}
}

} finally {
if (rlock != null) {
rlock.release();
rlock = null;
}
if (fis != null) {
fis.close();
fis = null;
}
}

} finally {
releaseConfigReadLock(groupKey);
if (null != fis) {
fis.close();
}
}

} finally {
if (out != null) {
out.close();
}
if (gis != null) {
gis.close();
}
}

} finally {
if (out != null) {
out.close();
}
if (gis != null) {
gis.close();
}
}

} finally {
if (null != os) {
os.close();
}
}

} finally {
if (null != sc) {
sc.close();
}
if (null != tc) {
tc.close();
}
}

} finally {
if (sqlFileIn != null) {
sqlFileIn.close();
}
}


} finally {
if (response != null) {
response.close();
}
}

} finally {
if (fc != null) {
fc.close();
}
}

@Maijh97 Maijh97 self-assigned this Dec 30, 2020
@Maijh97 Maijh97 linked a pull request Dec 30, 2020 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants