I see no side-effect.
The lock is guaranteed to be terminated in all cases, and an exception is no exception (pun intended).
More Related Contents:
- What is a StackOverflowError?
- How can I solve “java.lang.NoClassDefFoundError”?
- What are the effects of exceptions on performance in Java?
- How to generate exceptions from RepaintManager
- ClassNotFoundException com.mysql.jdbc.Driver [duplicate]
- How to create custom exceptions in Java? [closed]
- Given final block not properly padded
- Null check chain vs catching NullPointerException
- Static versus non-static lock object in synchronized block
- When should we create our own Java exception classes? [closed]
- How to test that no exception is thrown?
- Using Joda Date & Time API to parse multiple formats
- How to create a custom exception type in Java? [duplicate]
- Why are Exceptions not Checked in .NET?
- Java: Exceptions as control flow?
- Closing a Scanner throws java.util.NoSuchElementException
- “NoClassDefFoundError: Could not initialize class” error
- What is a suppressed exception?
- Why can’t Java constructors be synchronized?
- What are reasons for Exceptions not to be compatible with throws clauses?
- In Java how can I validate a thrown exception with JUnit?
- The throws keyword for exceptions in Java
- Exception other than RuntimeException
- Getting Exception org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
- Exception in thread “main” java.io.FileNotFoundException: Error
- What is meant by abstract=”true” in spring?
- Do two synchronized methods execute simultaneously
- How can I catch all exceptions thrown through reading / writing a file?
- Is it possible to detect if an exception occurred before I entered a finally block?
- Why does a Java Lambda which throws a Runtime Exception require brackets?