Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Ignore sonar false-positive; intentionally synchronizing on deque
Browse files Browse the repository at this point in the history
  • Loading branch information
mcculls committed Jan 29, 2022
1 parent 0958c33 commit 5f89d9d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,23 +252,23 @@ Object getSLF4JLogger( final Object bean )

private static <T> void synchronizedPush( final Deque<T> deque, final T element )
{
synchronized ( deque )
synchronized ( deque ) // NOSONAR
{
deque.addLast( element );
}
}

private static boolean synchronizedRemove( final Deque<?> deque, final Object element )
{
synchronized ( deque )
synchronized ( deque ) // NOSONAR
{
return deque.remove( element );
}
}

private static <T> T synchronizedPop( final Deque<T> deque )
{
synchronized ( deque )
synchronized ( deque ) // NOSONAR
{
return deque.pollLast();
}
Expand Down

0 comments on commit 5f89d9d

Please sign in to comment.