Skip to content

Commit f270dac

Browse files
committed
[ETCM-52] Fix scalastyle issues
1 parent 2d1d06f commit f270dac

File tree

1 file changed

+3
-3
lines changed
  • src/main/scala/io/iohk/ethereum/utils

1 file changed

+3
-3
lines changed

src/main/scala/io/iohk/ethereum/utils/Ref.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package io.iohk.ethereum.utils
33
import java.util.concurrent.atomic.AtomicReference
44

55
/**
6-
* An [[https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html java.util.concurrent.atomic.AtomicReference]] that can be set once.
7-
*/
6+
* An [[https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html AtomicReference]] that can be set once.
7+
*/
88
class Ref[T <: AnyRef] {
99
private[this] final val ref = new AtomicReference[Option[T]](None)
1010

1111
// set once (but not necessarily compute once)
12-
final def setOnce(t: T): Boolean = ref.get().isEmpty && ref.compareAndSet(None, Some(t))
12+
final def setOnce(t: T): Boolean = ref.get().isEmpty && ref.compareAndSet(None, Some(t))
1313

1414
final def isDefined: Boolean = ref.get().isDefined
1515
final def isEmpty: Boolean = ref.get().isEmpty

0 commit comments

Comments
 (0)