File tree Expand file tree Collapse file tree
main/java/dev/openfeature/sdk
test/java/dev/openfeature/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ void attach(
5959 AutoCloseableReentrantReadWriteLock lock ) {
6060 Attachment newAttachment = new Attachment (onEmit , lock );
6161 if (!this .attachment .compareAndSet (null , newAttachment )) {
62- throw new IllegalStateException (
63- "Provider " + this .getMetadata ().getName () + " is already attached." );
62+ throw new IllegalStateException ("Provider " + this .getMetadata ().getName () + " is already attached." );
6463 }
6564 }
6665
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ void emitAcquiresReadLockWhenAttached() throws Exception {
9696 };
9797
9898 eventProvider .attach (onEmit , lock );
99- eventProvider .emit (ProviderEvent .PROVIDER_READY , ProviderEventDetails .builder ().build ());
99+ eventProvider .emit (
100+ ProviderEvent .PROVIDER_READY , ProviderEventDetails .builder ().build ());
100101
101102 assertThat (lockAcquired .await (1 , TimeUnit .SECONDS )).isTrue ();
102103 }
@@ -106,8 +107,8 @@ void emitAcquiresReadLockWhenAttached() throws Exception {
106107 @ DisplayName ("emit should not acquire lock when not attached" )
107108 void emitDoesNotAcquireLockWhenNotAttached () {
108109 // emit without attaching — should return immediately without error
109- Awaitable result =
110- eventProvider . emit ( ProviderEvent .PROVIDER_READY , ProviderEventDetails .builder ().build ());
110+ Awaitable result = eventProvider . emit (
111+ ProviderEvent .PROVIDER_READY , ProviderEventDetails .builder ().build ());
111112 assertThat (result ).isSameAs (Awaitable .FINISHED );
112113 }
113114
Original file line number Diff line number Diff line change 11package dev .openfeature .sdk ;
22
3- import static org .assertj .core .api .Assertions .assertThat ;
43import static org .assertj .core .api .Assertions .assertThatCode ;
54import static org .mockito .ArgumentMatchers .contains ;
65import static org .mockito .Mockito .never ;
You can’t perform that action at this time.
0 commit comments