-
Notifications
You must be signed in to change notification settings - Fork 254
Description
🚀 Feature Request
Replace ExtensionContext.Store.CloseableResource to AutoCloseable
Line 39 in 4e48d88
| static class PlaywrightRegistry implements ExtensionContext.Store.CloseableResource { |
Example
from
static class PlaywrightRegistry implements ExtensionContext.Store.CloseableResource {to
static class PlaywrightRegistry implements AutoCloseable {Motivation
ExtensionContext.Store.CloseableResource is deprecated since 5.13
see:
https://docs.junit.org/5.14.0/user-guide/#extensions-keeping-state
Resource management via AutoCloseable
An extension context store is bound to its extension context lifecycle. When an extension context lifecycle ends it closes its associated store. As of JUnit 5.13, all stored values that are instances of AutoCloseable are notified by an invocation of their close() method in the inverse order they were added in (unless the junit.jupiter.extensions.store.close.autocloseable.enabled configuration parameter is set to false). Older versions only supported CloseableResource, which is deprecated but still available for backward compatibility.
Deprecated.
Please extend AutoCloseable directly.