diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 1b971dd7a9..ab638e9d2c 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Scala 2.13 test with coverage report
diff --git a/.github/workflows/package-test.yml b/.github/workflows/package-test.yml
index 8371c1b684..62e804fa24 100644
--- a/.github/workflows/package-test.yml
+++ b/.github/workflows/package-test.yml
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Packaging test
diff --git a/.github/workflows/release-js.yml b/.github/workflows/release-js.yml
index aa81d2152b..82097ee3e6 100644
--- a/.github/workflows/release-js.yml
+++ b/.github/workflows/release-js.yml
@@ -16,7 +16,7 @@ jobs:
fetch-depth: 10000
# Fetch all tags so that sbt-dynver can find the previous release version
- run: git fetch --tags -f
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Setup GPG
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bbc90324e5..2f3e360b64 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,7 +17,7 @@ jobs:
# Fetch all tags so that sbt-dynver can find the previous release version
- run: git fetch --tags -f
# Install OpenJDK 11
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Setup GPG
diff --git a/.github/workflows/sbt-integration.yml b/.github/workflows/sbt-integration.yml
index fcb0fa4a48..c84a7c530e 100644
--- a/.github/workflows/sbt-integration.yml
+++ b/.github/workflows/sbt-integration.yml
@@ -28,7 +28,7 @@ jobs:
# Fetch all tags so that sbt-dynver can find the previous release version
- run: git fetch --tags -f
working-directory: ./airframe
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Get Airframe version
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 6a14812f20..4864c56007 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -22,7 +22,7 @@ jobs:
fetch-depth: 10000
# Fetch all tags so that sbt-dynver can find the previous release version
- run: git fetch --tags
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Publish snapshots
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fd567fb03a..b32a9d7a51 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Scala 2.12 test
@@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Scala 2.13 test
@@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.16
- name: Scala 2.13 + JDK16 test
@@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- name: Scala 3.x test
@@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- uses: actions/setup-node@v2
@@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: olafurpg/setup-scala@v10
+ - uses: olafurpg/setup-scala@v11
with:
java-version: adopt@1.11
- uses: actions/setup-node@v2
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 90c0a9ec9d..71eabe9e2f 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version = 2.7.5
+version = 3.0.2
maxColumn = 120
style = defaultWithAlign
optIn.breaksInsideChains = true
diff --git a/airframe-canvas/src/main/scala/wvlet/airframe/canvas/UnsafeCanvas.scala b/airframe-canvas/src/main/scala/wvlet/airframe/canvas/UnsafeCanvas.scala
index ca01c1f334..4e9e51551a 100644
--- a/airframe-canvas/src/main/scala/wvlet/airframe/canvas/UnsafeCanvas.scala
+++ b/airframe-canvas/src/main/scala/wvlet/airframe/canvas/UnsafeCanvas.scala
@@ -15,8 +15,7 @@ package wvlet.airframe.canvas
import java.nio.ByteBuffer
/**
- * Canvas implementation with Unsafe memory access.
- * This provides native C-code level access performance.
+ * Canvas implementation with Unsafe memory access. This provides native C-code level access performance.
*/
final class UnsafeCanvas(
// Base object for resolving the relative address of the raw byte array.
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/DataType.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/DataType.scala
index 2352dc5669..e2cf028810 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/DataType.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/DataType.scala
@@ -65,8 +65,8 @@ object DataType {
}
/**
- * Union type represents a type whose data can be one of the specified types.
- * The members of a union type need to be record types.
+ * Union type represents a type whose data can be one of the specified types. The members of a union type need to be
+ * record types.
* @param types
*/
case class UNION(types: Seq[RecordType]) extends StructuredType {
@@ -94,7 +94,8 @@ object DataType {
@transient private lazy val columnIdx: Map[String, Int] = column.map(_.name).zipWithIndex.toMap[String, Int]
/**
- * @param index 0-origin index
+ * @param index
+ * 0-origin index
* @return
*/
def columnType(index: Int): Column = column(index)
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageCodec.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageCodec.scala
index 0c1329224e..6060aab031 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageCodec.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageCodec.scala
@@ -31,8 +31,7 @@ trait MessageCodec[A] extends LogSupport {
def pack(v: A): MsgPack = toMsgPack(v)
/**
- * Converting the input MessagePack into an object. If the conversion fails,
- * throw an IllegalArgumentException
+ * Converting the input MessagePack into an object. If the conversion fails, throw an IllegalArgumentException
*/
def unpack(msgpack: MsgPack): A = {
val unpacker = am.MessagePack.newUnpacker(msgpack)
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageContext.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageContext.scala
index af92d89203..142a911b70 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageContext.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageContext.scala
@@ -16,11 +16,9 @@ package wvlet.airframe.codec
import wvlet.airframe.codec.DataType._
/**
- * MessageContext is used for passing the parsing configuration and
- * the last value read by codec.
+ * MessageContext is used for passing the parsing configuration and the last value read by codec.
*
- * For efficiency, it holds several primitive type values as
- * local variables to avoid the boxing overhead.
+ * For efficiency, it holds several primitive type values as local variables to avoid the boxing overhead.
*/
case class MessageContext(
// For now, we have no specific configuration to add
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/ObjectCodec.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/ObjectCodec.scala
index 87f86a005e..3bc12db118 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/ObjectCodec.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/ObjectCodec.scala
@@ -25,8 +25,8 @@ trait PackAsMapSupport[A] { self: MessageCodec[A] =>
/**
* A generic codec for parameter lists:
- * - array form: [v1, v2, ...]
- * - map form: {k1:v1, k2:v2, ..}
+ * - array form: [v1, v2, ...]
+ * - map form: {k1:v1, k2:v2, ..}
*
* @param name
* @param params
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/PrimitiveCodec.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/PrimitiveCodec.scala
index e0f7f861fa..189a996ae2 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/PrimitiveCodec.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/PrimitiveCodec.scala
@@ -910,12 +910,11 @@ object PrimitiveCodec {
}
/**
- * Codec for Any values. This only supports very basic types to enable
- * packing/unpacking collections like Seq[Any], Map[Any, Any] at ease.
+ * Codec for Any values. This only supports very basic types to enable packing/unpacking collections like Seq[Any],
+ * Map[Any, Any] at ease.
*
- * Another option to implement AnyCodec is packing pairs of (type, value), but
- * we will not take this approach as this will require many bytes to fully encode
- * type names.
+ * Another option to implement AnyCodec is packing pairs of (type, value), but we will not take this approach as this
+ * will require many bytes to fully encode type names.
*/
object AnyCodec extends MessageCodec[Any] {
override def pack(p: Packer, v: Any): Unit = {
diff --git a/airframe-codec/src/main/scala/wvlet/airframe/codec/UnionCodec.scala b/airframe-codec/src/main/scala/wvlet/airframe/codec/UnionCodec.scala
index f5b6e15b9b..d1215a7cd3 100644
--- a/airframe-codec/src/main/scala/wvlet/airframe/codec/UnionCodec.scala
+++ b/airframe-codec/src/main/scala/wvlet/airframe/codec/UnionCodec.scala
@@ -17,8 +17,7 @@ import wvlet.airframe.msgpack.spi.{Packer, Unpacker}
import wvlet.airframe.surface.{Surface, Union}
/**
- * Codec for union classes (e.g., A or B)
- * This codec is necessary for defining OpenAPI's model classes
+ * Codec for union classes (e.g., A or B) This codec is necessary for defining OpenAPI's model classes
*/
case class UnionCodec(codecs: Seq[MessageCodec[_]]) extends MessageCodec[Union] {
override def pack(p: Packer, v: Union): Unit = {
diff --git a/airframe-config/src/main/scala/wvlet/airframe/config/Config.scala b/airframe-config/src/main/scala/wvlet/airframe/config/Config.scala
index 1ddf7d46b9..4a412d6794 100644
--- a/airframe-config/src/main/scala/wvlet/airframe/config/Config.scala
+++ b/airframe-config/src/main/scala/wvlet/airframe/config/Config.scala
@@ -95,8 +95,7 @@ case class Config private[config] (env: ConfigEnv, holder: Map[Surface, ConfigHo
import wvlet.airframe.surface.reflect._
/**
- * Create a map representation of this config for display purpose.
- * Parameters with @secret annotation will be hidden.
+ * Create a map representation of this config for display purpose. Parameters with @secret annotation will be hidden.
*/
def toPrintableMap: Map[String, Any] = {
def traverse(s: Surface, v: Any, secret: Option[wvlet.airframe.surface.secret]): Any = {
diff --git a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/OSType.scala b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/OSType.scala
index 0caf3d14d0..d0aea5d277 100644
--- a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/OSType.scala
+++ b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/OSType.scala
@@ -25,7 +25,8 @@ import scala.sys.process.Process
/**
* OS type resolver
*
- * @author leo
+ * @author
+ * leo
*/
object OS {
def isWindows: Boolean = getType == OSType.Windows
diff --git a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Parallel.scala b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Parallel.scala
index 45dce2e69f..bcd795e39d 100644
--- a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Parallel.scala
+++ b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Parallel.scala
@@ -58,10 +58,14 @@ object Parallel extends LogSupport {
/**
* Process all elements of the source by the given function then wait for the completion.
*
- * @param source Source collection
- * @param parallelism Parallelism, the default value is a number of available processors
- * @param f Function which processes each element of the source collection
- * @return Collection of the results
+ * @param source
+ * Source collection
+ * @param parallelism
+ * Parallelism, the default value is a number of available processors
+ * @param f
+ * Function which processes each element of the source collection
+ * @return
+ * Collection of the results
*/
def run[T, R: ClassTag](source: Seq[T], parallelism: Int = Runtime.getRuntime.availableProcessors())(
f: T => R
@@ -115,13 +119,17 @@ object Parallel extends LogSupport {
}
/**
- * Process all elements of the source by the given function then don't wait completion.
- * The result is an iterator which is likely a stream which elements are pushed continuously.
+ * Process all elements of the source by the given function then don't wait completion. The result is an iterator
+ * which is likely a stream which elements are pushed continuously.
*
- * @param source the source iterator
- * @param parallelism Parallelism, the default value is a number of available processors
- * @param f Function which processes each element of the source collection
- * @return Iterator of the results
+ * @param source
+ * the source iterator
+ * @param parallelism
+ * Parallelism, the default value is a number of available processors
+ * @param f
+ * Function which processes each element of the source collection
+ * @return
+ * Iterator of the results
*/
def iterate[T, R](
source: Iterator[T],
diff --git a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Shell.scala b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Shell.scala
index 378f440c54..ff01cf9446 100644
--- a/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Shell.scala
+++ b/airframe-control/.jvm/src/main/scala/wvlet/airframe/control/Shell.scala
@@ -56,7 +56,8 @@ object Shell extends LogSupport {
/**
* Kill the process tree rooted from pid
* @param pid
- * @return exit code
+ * @return
+ * exit code
*/
def killTree(pid: Int, signal: String = "TERM"): Int = {
// stop the parent process first to keep it from forking another child process
@@ -103,8 +104,7 @@ object Shell extends LogSupport {
}
/**
- * launch a command in the remote host. The target host needs to be accessed
- * via ssh command without password.
+ * launch a command in the remote host. The target host needs to be accessed via ssh command without password.
* @param host
* @param cmdLine
*/
@@ -115,7 +115,8 @@ object Shell extends LogSupport {
/**
* Return the process ID of the current JVM.
*
- * @return process id or -1 when process ID is not found.
+ * @return
+ * process id or -1 when process ID is not found.
*/
def getProcessIDOfCurrentJVM: Int = {
val r = ManagementFactory.getRuntimeMXBean
@@ -127,7 +128,8 @@ object Shell extends LogSupport {
/**
* Returns process id
* @param p
- * @return process id or -1 if pid cannot be detected
+ * @return
+ * process id or -1 if pid cannot be detected
*/
def getProcessID(p: java.lang.Process): Option[Int] = {
Try(p.pid().toInt).toOption.orElse {
diff --git a/airframe-control/.jvm/src/test/scala/wvlet/airframe/control/ShellTest.scala b/airframe-control/.jvm/src/test/scala/wvlet/airframe/control/ShellTest.scala
index 9013ab1a55..8948970c73 100644
--- a/airframe-control/.jvm/src/test/scala/wvlet/airframe/control/ShellTest.scala
+++ b/airframe-control/.jvm/src/test/scala/wvlet/airframe/control/ShellTest.scala
@@ -24,7 +24,8 @@ import wvlet.airspec.AirSpec
//--------------------------------------
/**
- * @author leo
+ * @author
+ * leo
*/
class ShellTest extends AirSpec {
diff --git a/airframe-control/src/main/scala/wvlet/airframe/control/CircuitBreaker.scala b/airframe-control/src/main/scala/wvlet/airframe/control/CircuitBreaker.scala
index 84e65b9ae5..bd89dc87f9 100644
--- a/airframe-control/src/main/scala/wvlet/airframe/control/CircuitBreaker.scala
+++ b/airframe-control/src/main/scala/wvlet/airframe/control/CircuitBreaker.scala
@@ -47,8 +47,8 @@ object CircuitBreaker extends LogSupport {
}
/**
- * Create a CircuitBreaker that will be open if the failure rate in a time window exceeds the given threshold.
- * The failure rate will be decayed exponentially as time goes.
+ * Create a CircuitBreaker that will be open if the failure rate in a time window exceeds the given threshold. The
+ * failure rate will be decayed exponentially as time goes.
*/
def withFailureRate(failureRate: Double, timeWindowMillis: Int = 60000): CircuitBreaker = {
default.withHealthCheckPolicy(HealthCheckPolicy.markDeadOnRecentFailureRate(failureRate, timeWindowMillis))
@@ -176,24 +176,24 @@ case class CircuitBreaker(
}
/**
- * Set a classifier to determine whether the exception happened in the code block can be ignoreable or not for
- * the accessing the target service.
+ * Set a classifier to determine whether the exception happened in the code block can be ignoreable or not for the
+ * accessing the target service.
*/
def withErrorClassifier(newErrorClassifier: Throwable => ResultClass.Failed): CircuitBreaker = {
this.copy(errorClassifier = newErrorClassifier)
}
/**
- * Set a delay policy until moving the state from OPEN to HALF_OPEN (probing) state.
- * The default is Jittered-exponential backoff delay with the initial interval of 30 seconds.
+ * Set a delay policy until moving the state from OPEN to HALF_OPEN (probing) state. The default is
+ * Jittered-exponential backoff delay with the initial interval of 30 seconds.
*/
def withDelayAfterMarkedDead(retryPolicy: RetryPolicy): CircuitBreaker = {
this.copy(delayAfterMarkedDead = retryPolicy)
}
/**
- * Set a fallback handler which process the exception happened in the code block.
- * The default is just throwing the exception as it is.
+ * Set a fallback handler which process the exception happened in the code block. The default is just throwing the
+ * exception as it is.
*/
def withFallbackHandler(handler: Throwable => Any): CircuitBreaker = {
this.copy(fallbackHandler = handler)
@@ -207,16 +207,16 @@ case class CircuitBreaker(
}
/**
- * Set a recovery policiy which determine if ths circuit breaker can recover from HALF_OPEN to CLOSED.
- * The default policy recovers immediately if health check is once successful.
+ * Set a recovery policiy which determine if ths circuit breaker can recover from HALF_OPEN to CLOSED. The default
+ * policy recovers immediately if health check is once successful.
*/
def withRecoveryPolicy(recoveryPolicy: CircuitBreakerRecoveryPolicy): CircuitBreaker = {
this.copy(recoveryPolicy = recoveryPolicy)
}
/**
- * Defines the action when trying to use the open circuit. The default
- * behavior is to throw CircuitBreakerOpenException
+ * Defines the action when trying to use the open circuit. The default behavior is to throw
+ * CircuitBreakerOpenException
*/
def onOpenFailure(handler: CircuitBreakerContext => Unit): CircuitBreaker = {
this.copy(onOpenFailureHandler = handler)
@@ -260,8 +260,8 @@ case class CircuitBreaker(
/**
* Note: Use this method only for the standalone mode. Generally, using CircuiteBreaker.run is sufficient.
*
- * If the connection is open, perform the specified action. The
- * default behavior is fail-fast, i.e., throwing CircuitBreakerOpenException
+ * If the connection is open, perform the specified action. The default behavior is fail-fast, i.e., throwing
+ * CircuitBreakerOpenException
*/
def verifyConnection: Unit = {
if (!isConnected) {
@@ -321,15 +321,15 @@ case class CircuitBreaker(
/**
* Execute the body block through the CircuitBreaker.
*
- * If the state is OPEN, this will throw CircuitBreakerOpenException (fail-fast). The state will move to HALF_OPEN state
- * after a certain amount of delay, determined by the delayAfterMarkedDead policy.
+ * If the state is OPEN, this will throw CircuitBreakerOpenException (fail-fast). The state will move to HALF_OPEN
+ * state after a certain amount of delay, determined by the delayAfterMarkedDead policy.
*
- * If the state is HALF_OPEN, this method allows running the code block once, and if the result is successful,
- * the state will move to CLOSED. If not, the state will be OPEN again.
+ * If the state is HALF_OPEN, this method allows running the code block once, and if the result is successful, the
+ * state will move to CLOSED. If not, the state will be OPEN again.
*
- * If the state is CLOSED, the code block will be executed normally. If the result is marked failure or nonRetryable exception
- * is thrown, it will report to the failure to the HealthCheckPolicy. If this policy determines the target service is dead,
- * the circuit will shift to OPEN state to block the future execution.
+ * If the state is CLOSED, the code block will be executed normally. If the result is marked failure or nonRetryable
+ * exception is thrown, it will report to the failure to the HealthCheckPolicy. If this policy determines the target
+ * service is dead, the circuit will shift to OPEN state to block the future execution.
*/
def run[A: ClassTag](body: => A): A = {
verifyConnection
diff --git a/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala b/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala
index 6d0dc24b01..59fdb9d8b3 100644
--- a/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala
+++ b/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala
@@ -66,8 +66,7 @@ object HealthCheckPolicy extends LogSupport {
}
/**
- * Called when request is failed.
- * Returns delay
+ * Called when request is failed. Returns delay
*/
override def recordFailure: Unit = {
consecutiveFailures.incrementAndGet()
diff --git a/airframe-control/src/main/scala/wvlet/airframe/control/Retry.scala b/airframe-control/src/main/scala/wvlet/airframe/control/Retry.scala
index 18455bd3b7..cd72801912 100644
--- a/airframe-control/src/main/scala/wvlet/airframe/control/Retry.scala
+++ b/airframe-control/src/main/scala/wvlet/airframe/control/Retry.scala
@@ -164,7 +164,8 @@ object Retry extends LogSupport {
* Update the retry context, including retry count, last error, next wait time, etc.
*
* @param retryReason
- * @return the next retry context
+ * @return
+ * the next retry context
*/
def nextRetry(retryReason: Throwable): RetryContext = {
val nextRetryCtx = this.copy(
@@ -221,8 +222,8 @@ object Retry extends LogSupport {
}
/**
- * Set a detailed error handler upon Exception. If the given exception is not retryable,
- * just rethrow the exception. Otherwise, consume the exception.
+ * Set a detailed error handler upon Exception. If the given exception is not retryable, just rethrow the
+ * exception. Otherwise, consume the exception.
*/
def withErrorClassifier(errorClassifier: Throwable => ResultClass.Failed): RetryContext = {
this.copy(errorClassifier = errorClassifier)
diff --git a/airframe-control/src/main/scala/wvlet/airframe/control/util/ExponentialMovingAverage.scala b/airframe-control/src/main/scala/wvlet/airframe/control/util/ExponentialMovingAverage.scala
index 8fcff59bf4..5414c9807e 100644
--- a/airframe-control/src/main/scala/wvlet/airframe/control/util/ExponentialMovingAverage.scala
+++ b/airframe-control/src/main/scala/wvlet/airframe/control/util/ExponentialMovingAverage.scala
@@ -28,8 +28,7 @@ private[control] class ExponentialMovingAverage(windowSize: Long) {
/**
* Update the average with observed value `x`, and return the new average.
*
- * Since `update` requires monotonic timestamps, it is up to the caller to
- * ensure that calls to update do not race.
+ * Since `update` requires monotonic timestamps, it is up to the caller to ensure that calls to update do not race.
*/
def update(timeStamp: Long, x: Double): Double = {
if (time == Long.MinValue) {
@@ -50,7 +49,8 @@ private[control] class ExponentialMovingAverage(windowSize: Long) {
/**
* Return the last observation.
*
- * @note This is safe to call without synchronization.
+ * @note
+ * This is safe to call without synchronization.
*/
def last: Double = ema
diff --git a/airframe-di-macros/src/main/scala-2/wvlet/airframe/AirframeMacros.scala b/airframe-di-macros/src/main/scala-2/wvlet/airframe/AirframeMacros.scala
index 22c7747eaa..e7b1426e67 100644
--- a/airframe-di-macros/src/main/scala-2/wvlet/airframe/AirframeMacros.scala
+++ b/airframe-di-macros/src/main/scala-2/wvlet/airframe/AirframeMacros.scala
@@ -101,8 +101,8 @@ private[wvlet] object AirframeMacros {
}
/**
- * Register a factory for generating a trait that can embed the current session.
- * This step is necessary for instantiating trait, which has no default constructor.
+ * Register a factory for generating a trait that can embed the current session. This step is necessary for
+ * instantiating trait, which has no default constructor.
*
* This method will return the surface of t
*/
diff --git a/airframe-di/.jvm/src/main/scala/wvlet/airframe/tracing/ChromeTracer.scala b/airframe-di/.jvm/src/main/scala/wvlet/airframe/tracing/ChromeTracer.scala
index c92fdc573b..074b310497 100644
--- a/airframe-di/.jvm/src/main/scala/wvlet/airframe/tracing/ChromeTracer.scala
+++ b/airframe-di/.jvm/src/main/scala/wvlet/airframe/tracing/ChromeTracer.scala
@@ -157,14 +157,15 @@ object ChromeTracer {
}
/**
- * name: The name of the event, as displayed in Trace Viewer
- * cat: The event categories. This is a comma separated list of categories for the event. The categories can be used to hide events in the Trace Viewer UI.
- * ph: The event type. This is a single character which changes depending on the type of event being output. The valid values are listed in the table below. We will discuss each phase type below.
- * ts: The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity.
- * tts: Optional. The thread clock timestamp of the event. The timestamps are provided at microsecond granularity.
- * pid: The process ID for the process that output this event.
- * tid: The thread ID for the thread that output this event.
- * args: Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.
+ * name: The name of the event, as displayed in Trace Viewer cat: The event categories. This is a comma separated
+ * list of categories for the event. The categories can be used to hide events in the Trace Viewer UI. ph: The event
+ * type. This is a single character which changes depending on the type of event being output. The valid values are
+ * listed in the table below. We will discuss each phase type below. ts: The tracing clock timestamp of the event.
+ * The timestamps are provided at microsecond granularity. tts: Optional. The thread clock timestamp of the event.
+ * The timestamps are provided at microsecond granularity. pid: The process ID for the process that output this
+ * event. tid: The thread ID for the thread that output this event. args: Any arguments provided for the event. Some
+ * of the event types have required argument fields, otherwise, you can put any information you wish in here. The
+ * arguments are displayed in Trace Viewer when you view an event in the analysis section.
*/
case class Event(name: String, cat: String, ph: String, ts: Long, pid: Long, tid: Long, args: String = "{}") {
// Do not use airframe-json or codec here to avoid introducing extra dependencies.
diff --git a/airframe-di/.jvm/src/test/scala/wvlet/airframe/ConstructorBindingTest.scala b/airframe-di/.jvm/src/test/scala/wvlet/airframe/ConstructorBindingTest.scala
index 6dbf4e30fb..0c3147a5eb 100644
--- a/airframe-di/.jvm/src/test/scala/wvlet/airframe/ConstructorBindingTest.scala
+++ b/airframe-di/.jvm/src/test/scala/wvlet/airframe/ConstructorBindingTest.scala
@@ -16,8 +16,7 @@ package wvlet.airframe
import wvlet.airspec.AirSpec
/**
- * TODO: This works only in JVM,
- * because we cannot extract constructor default parameters in Scala.js
+ * TODO: This works only in JVM, because we cannot extract constructor default parameters in Scala.js
*/
class ConstructorBindingTest extends AirSpec {
import ConstructorBindingTest._
diff --git a/airframe-di/.jvm/src/test/scala/wvlet/airframe/LocalCaseClassTest.scala b/airframe-di/.jvm/src/test/scala/wvlet/airframe/LocalCaseClassTest.scala
index 2eede10d4f..f3505e11fd 100644
--- a/airframe-di/.jvm/src/test/scala/wvlet/airframe/LocalCaseClassTest.scala
+++ b/airframe-di/.jvm/src/test/scala/wvlet/airframe/LocalCaseClassTest.scala
@@ -17,8 +17,8 @@ import wvlet.airframe.surface.Surface
import wvlet.airspec.AirSpec
/**
- * Reproduction of https://github.com/wvlet/airframe/pull/423
- * Locally created case classes should be visible inside the generated code.
+ * Reproduction of https://github.com/wvlet/airframe/pull/423 Locally created case classes should be visible inside the
+ * generated code.
*/
class LocalCaseClassTest extends AirSpec {
case class LocalConfigA()
diff --git a/airframe-di/src/main/scala-2/wvlet/airframe/DesignImpl.scala b/airframe-di/src/main/scala-2/wvlet/airframe/DesignImpl.scala
index 1e3180e279..991fff03fc 100644
--- a/airframe-di/src/main/scala-2/wvlet/airframe/DesignImpl.scala
+++ b/airframe-di/src/main/scala-2/wvlet/airframe/DesignImpl.scala
@@ -14,9 +14,8 @@ private[airframe] trait DesignImpl extends LogSupport {
def remove[A]: Design = macro AirframeMacros.designRemoveImpl[A]
/**
- * A helper method of creating a new session and an instance of A.
- * This method is useful when you only need to use A as an entry point of your program.
- * After executing the body, the sesion will be closed.
+ * A helper method of creating a new session and an instance of A. This method is useful when you only need to use A
+ * as an entry point of your program. After executing the body, the sesion will be closed.
*
* @param body
* @tparam A
diff --git a/airframe-di/src/main/scala-2/wvlet/airframe/SessionImpl.scala b/airframe-di/src/main/scala-2/wvlet/airframe/SessionImpl.scala
index 5600c1c338..7cd6698b6e 100644
--- a/airframe-di/src/main/scala-2/wvlet/airframe/SessionImpl.scala
+++ b/airframe-di/src/main/scala-2/wvlet/airframe/SessionImpl.scala
@@ -6,12 +6,12 @@ import scala.reflect.runtime.{universe => ru}
private[airframe] trait SessionImpl { self: Session =>
/**
- * Build an instance of A. In general this method is necessary only when creating an entry
- * point of your application. When feasible avoid using this method so that Airframe can
- * inject objects where bind[X] is used.
+ * Build an instance of A. In general this method is necessary only when creating an entry point of your application.
+ * When feasible avoid using this method so that Airframe can inject objects where bind[X] is used.
*
* @tparam A
- * @return object
+ * @return
+ * object
*/
def build[A]: A = macro AirframeMacros.buildImpl[A]
diff --git a/airframe-di/src/main/scala-2/wvlet/airframe/package.scala b/airframe-di/src/main/scala-2/wvlet/airframe/package.scala
index db6e9b80c3..938d80245b 100644
--- a/airframe-di/src/main/scala-2/wvlet/airframe/package.scala
+++ b/airframe-di/src/main/scala-2/wvlet/airframe/package.scala
@@ -27,12 +27,9 @@ import scala.language.implicitConversions
package object airframe {
/**
- * The entry point to create a new design beginning from a blanc design
- *
- * import wvlet.airframe._
+ * The entry point to create a new design beginning from a blanc design import wvlet.airframe._
*
- * val d = design.bind[X]
- *
+ * val d = design.bind[X]
*/
def newDesign: Design = Design.empty
@@ -71,38 +68,38 @@ package object airframe {
macro bind5Impl[A, D1, D2, D3, D4, D5]
/**
- * Create a new instance of A using the provider function.
- * The lifecycle of the generated instance of A will be managed by the current session.
+ * Create a new instance of A using the provider function. The lifecycle of the generated instance of A will be
+ * managed by the current session.
*/
def bindLocal[A](provider: => A): A = macro bindLocal0Impl[A]
/**
- * Create a new instance of A using the provider function that receives a dependency of D1.
- * The lifecycle of the generated instaance of A will be managed by the current session
+ * Create a new instance of A using the provider function that receives a dependency of D1. The lifecycle of the
+ * generated instaance of A will be managed by the current session
*/
def bindLocal[A, D1](provider: => D1 => A): A = macro bindLocal1Impl[A, D1]
/**
- * Create a new instance of A using the provider function that receives dependencies of D1 and D2.
- * The lifecycle of the generated instance of A will be managed by the current session
+ * Create a new instance of A using the provider function that receives dependencies of D1 and D2. The lifecycle of
+ * the generated instance of A will be managed by the current session
*/
def bindLocal[A, D1, D2](provider: => (D1, D2) => A): A = macro bindLocal2Impl[A, D1, D2]
/**
- * Create a new instance of A using the provider function that receives dependencies of D1, D2, and D3.
- * The lifecycle of the generated instance of A will be managed by the current session
+ * Create a new instance of A using the provider function that receives dependencies of D1, D2, and D3. The lifecycle
+ * of the generated instance of A will be managed by the current session
*/
def bindLocal[A, D1, D2, D3](provider: => (D1, D2, D3) => A): A = macro bindLocal3Impl[A, D1, D2, D3]
/**
- * Create a new instance of A using the provider function that receives dependencies of D1, D2, D3, and D4.
- * The lifecycle of the generated instance of A will be managed by the current session
+ * Create a new instance of A using the provider function that receives dependencies of D1, D2, D3, and D4. The
+ * lifecycle of the generated instance of A will be managed by the current session
*/
def bindLocal[A, D1, D2, D3, D4](provider: => (D1, D2, D3, D4) => A): A = macro bindLocal4Impl[A, D1, D2, D3, D4]
/**
- * Create a new instance of A using the provider function that receives dependencies of D1, D2, D3, D4, and D5.
- * The lifecycle of the generated instance of A will be managed by the current session
+ * Create a new instance of A using the provider function that receives dependencies of D1, D2, D3, D4, and D5. The
+ * lifecycle of the generated instance of A will be managed by the current session
*/
def bindLocal[A, D1, D2, D3, D4, D5](provider: => (D1, D2, D3, D4, D5) => A): A =
macro bindLocal5Impl[A, D1, D2, D3, D4, D5]
diff --git a/airframe-di/src/main/scala-3/wvlet/airframe/package.scala b/airframe-di/src/main/scala-3/wvlet/airframe/package.scala
index d103de58b3..aa5a50c768 100644
--- a/airframe-di/src/main/scala-3/wvlet/airframe/package.scala
+++ b/airframe-di/src/main/scala-3/wvlet/airframe/package.scala
@@ -25,12 +25,9 @@ import scala.language.implicitConversions
package object airframe {
/**
- * The entry point to create a new design beginning from a blanc design
- *
- * import wvlet.airframe._
+ * The entry point to create a new design beginning from a blanc design import wvlet.airframe._
*
- * val d = design.bind[X]
- *
+ * val d = design.bind[X]
*/
def newDesign: Design = Design.empty
diff --git a/airframe-di/src/main/scala/wvlet/airframe/AirframeSession.scala b/airframe-di/src/main/scala/wvlet/airframe/AirframeSession.scala
index f1cacde914..5076d0eedb 100644
--- a/airframe-di/src/main/scala/wvlet/airframe/AirframeSession.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/AirframeSession.scala
@@ -184,8 +184,8 @@ private[airframe] class AirframeSession(
}
/**
- * Called when injecting an instance of the surface for the first time.
- * The other hooks (e.g., onStart, onShutdown) will be called in a separate step after the object is injected.
+ * Called when injecting an instance of the surface for the first time. The other hooks (e.g., onStart, onShutdown)
+ * will be called in a separate step after the object is injected.
*/
private[airframe] def registerInjectee(bindTarget: Surface, tpe: Surface, injectee: Any): AnyRef = {
debug(s"[${name}] Init [${bindTarget} -> ${tpe}]: ${injectee}")
@@ -209,8 +209,8 @@ private[airframe] class AirframeSession(
}
/**
- * If an injected class implements close() (in AutoCloseable interface), add a shutdown hook to call
- * close() if there is no other shutdown hooks
+ * If an injected class implements close() (in AutoCloseable interface), add a shutdown hook to call close() if
+ * there is no other shutdown hooks
*/
if (classOf[AutoCloseable].isAssignableFrom(injectee.getClass)) {
injectee match {
@@ -245,7 +245,8 @@ private[airframe] class AirframeSession(
private[airframe] val observedTypes = new ConcurrentHashMap[Surface, Long]().asScala
/**
- * Find a session (including parent and ancestor parents) that owns t, that is, a session that can build t or has ever built t.
+ * Find a session (including parent and ancestor parents) that owns t, that is, a session that can build t or has
+ * ever built t.
*/
private[airframe] def findOwnerSessionOf(t: Surface): Option[AirframeSession] = {
if (bindingTable.contains(t) || observedTypes.contains(t)) {
diff --git a/airframe-di/src/main/scala/wvlet/airframe/Binder.scala b/airframe-di/src/main/scala/wvlet/airframe/Binder.scala
index 8fe3f6e4b8..fe2459ba3a 100644
--- a/airframe-di/src/main/scala/wvlet/airframe/Binder.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/Binder.scala
@@ -98,8 +98,8 @@ import wvlet.airframe.Binder._
class Binder[A](val design: Design, val from: Surface, val sourceCode: SourceCode) extends BinderImpl[A] {
/**
- * Bind the type to a given instance. The instance will be instantiated as an eager singleton when creating a session.
- * Note that as you create a new session, new instance will be generated.
+ * Bind the type to a given instance. The instance will be instantiated as an eager singleton when creating a
+ * session. Note that as you create a new session, new instance will be generated.
*
* @param any
* @return
@@ -153,8 +153,8 @@ class Binder[A](val design: Design, val from: Surface, val sourceCode: SourceCod
}
/**
- * DesignWithContext[A] is a wrapper of Design class for chaining lifecycle hooks for the same type A.
- * This can be safely cast to just Design
+ * DesignWithContext[A] is a wrapper of Design class for chaining lifecycle hooks for the same type A. This can be
+ * safely cast to just Design
*/
class DesignWithContext[A](
design: Design,
diff --git a/airframe-di/src/main/scala/wvlet/airframe/Design.scala b/airframe-di/src/main/scala/wvlet/airframe/Design.scala
index 09f08028e8..213a5b0656 100755
--- a/airframe-di/src/main/scala/wvlet/airframe/Design.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/Design.scala
@@ -186,8 +186,8 @@ class Design(
/**
* Create a new session.
*
- * With this method, the session will not start automatically. You need to explicitly call
- * session.start and session.shutdown to start/terminate the lifecycle of objects
+ * With this method, the session will not start automatically. You need to explicitly call session.start and
+ * session.shutdown to start/terminate the lifecycle of objects
*
* @return
*/
@@ -222,8 +222,7 @@ class Design(
object Design {
/**
- * Empty design.
- * Using Vector as a binding holder for performance and serialization reason
+ * Empty design. Using Vector as a binding holder for performance and serialization reason
*/
private[airframe] val blanc: Design = new Design(new DesignOptions(), Vector.empty, Vector.empty)
diff --git a/airframe-di/src/main/scala/wvlet/airframe/LazyF0.scala b/airframe-di/src/main/scala/wvlet/airframe/LazyF0.scala
index 05dbddf909..367aad04b8 100644
--- a/airframe-di/src/main/scala/wvlet/airframe/LazyF0.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/LazyF0.scala
@@ -22,8 +22,7 @@ object LazyF0 {
/**
* This class is used to obtain the class names of the call-by-name functions (Function0[R]).
*
- * This wrapper do not directly access the field f (Function0[R]) in order
- * to avoid the evaluation of the function.
+ * This wrapper do not directly access the field f (Function0[R]) in order to avoid the evaluation of the function.
* @param f
* @tparam R
*/
@@ -48,8 +47,8 @@ class LazyF0[+R](f: => R) extends Serializable with Cloneable {
}
/**
- * This definition is necessary to let compiler generate the private field 'f' that
- * holds a reference to the call-by-name function.
+ * This definition is necessary to let compiler generate the private field 'f' that holds a reference to the
+ * call-by-name function.
*
* @return
*/
diff --git a/airframe-di/src/main/scala/wvlet/airframe/Session.scala b/airframe-di/src/main/scala/wvlet/airframe/Session.scala
index 8a0f781421..5665230850 100644
--- a/airframe-di/src/main/scala/wvlet/airframe/Session.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/Session.scala
@@ -41,8 +41,7 @@ trait Session extends SessionImpl with AutoCloseable {
def design: Design
/**
- * Internal method for building an instance of type A. This method does not inject the
- * session to A at first hand.
+ * Internal method for building an instance of type A. This method does not inject the session to A at first hand.
*
* @tparam A
* @return
@@ -50,7 +49,8 @@ trait Session extends SessionImpl with AutoCloseable {
def get[A](surface: Surface)(implicit sourceCode: SourceCode): A
/**
- * Internal method for building an instance of type A, or if no binding is found, use the given trait instance factory
+ * Internal method for building an instance of type A, or if no binding is found, use the given trait instance
+ * factory
*
* @tparam A
* @return
@@ -65,30 +65,35 @@ trait Session extends SessionImpl with AutoCloseable {
def getInstanceOf(surface: Surface)(implicit sourceCode: SourceCode): Any
/**
- * Create a child session with an additional design.
- * The created session shares the same singleton holder and the lifecycle manager with this session.
+ * Create a child session with an additional design. The created session shares the same singleton holder and the
+ * lifecycle manager with this session.
*/
def newSharedChildSession(d: Design): Session
/**
- * Create a child session with an additional design.
- * The created session has its own singleton holder and a lifecycle manager.
+ * Create a child session with an additional design. The created session has its own singleton holder and a lifecycle
+ * manager.
*
- * - Child sessions tries to delegate the object binding to the parent (or ancestor) session if no corresponding binding is defined in the child design.
- * - If the parent and ancestors ve no binding for a given type, it will creates a new object in the child session.
- * - If the parent or an ancestor session already initialized a target binding, lifecycle hooks for that binding will not be called in the child session.
+ * - Child sessions tries to delegate the object binding to the parent (or ancestor) session if no corresponding
+ * binding is defined in the child design.
+ * - If the parent and ancestors ve no binding for a given type, it will creates a new object in the child session.
+ * - If the parent or an ancestor session already initialized a target binding, lifecycle hooks for that binding
+ * will not be called in the child session.
*
- * @param d Additional design for child session
- * @param inheritParentDesignOptions if true (default) use the same design options (e.g., production mode, life cycle logging) with the parent design
+ * @param d
+ * Additional design for child session
+ * @param inheritParentDesignOptions
+ * if true (default) use the same design options (e.g., production mode, life cycle logging) with the parent design
* @return
*/
def newChildSession(d: Design = Design.blanc, inheritParentDesignOptions: Boolean = true): Session
/**
- * Create a child session and execute the body part.
- * The created session has its own singleton holder and lifecycle manager.
+ * Create a child session and execute the body part. The created session has its own singleton holder and lifecycle
+ * manager.
*
- * @param d Additional design for child session.
+ * @param d
+ * Additional design for child session.
* @param body
* @tparam U
* @return
diff --git a/airframe-di/src/main/scala/wvlet/airframe/lifecycle/LifeCycleManager.scala b/airframe-di/src/main/scala/wvlet/airframe/lifecycle/LifeCycleManager.scala
index 5d16c4e6c6..26dcb3fdfa 100644
--- a/airframe-di/src/main/scala/wvlet/airframe/lifecycle/LifeCycleManager.scala
+++ b/airframe-di/src/main/scala/wvlet/airframe/lifecycle/LifeCycleManager.scala
@@ -257,7 +257,7 @@ object LifeCycleManager {
}
/**
- * Return true if it is not yet registered
+ * Return true if it is not yet registered
*/
def registerOnlyOnce(x: LifeCycleHook): Boolean = {
synchronized {
@@ -320,9 +320,8 @@ object ShowDebugLifeCycleLog extends LifeCycleEventHandler {
/**
* First In, Last Out (FILO) hook executor.
*
- * If objects are injected in A -> B -> C order, the init and shutdown orders will be as follows:
- * init hook call order: A -> B -> C
- * shutdown hook call order: C -> B -> A
+ * If objects are injected in A -> B -> C order, the init and shutdown orders will be as follows: init hook call order:
+ * A -> B -> C shutdown hook call order: C -> B -> A
*/
object FILOLifeCycleHookExecutor extends LifeCycleEventHandler with LogSupport {
override def beforeStart(lifeCycleManager: LifeCycleManager): Unit = {
diff --git a/airframe-di/src/test/scala-2/wvlet/airframe/legacy/AirframeTest.scala b/airframe-di/src/test/scala-2/wvlet/airframe/legacy/AirframeTest.scala
index efeaff8ac4..edf2b10a3f 100644
--- a/airframe-di/src/test/scala-2/wvlet/airframe/legacy/AirframeTest.scala
+++ b/airframe-di/src/test/scala-2/wvlet/airframe/legacy/AirframeTest.scala
@@ -61,11 +61,9 @@ object ServiceMixinExample {
}
/**
- * Mix-in printer/fortune instances
- * Pros:
+ * Mix-in printer/fortune instances Pros:
* - trait can be shared with multiple components
- * - xxxService trait can be a module
- * Cons:
+ * - xxxService trait can be a module Cons:
* - Need to define XXXService boilerplate, which just has a val or def of the service object
* - Cannot change the variable name without defining additional XXXService trait
* - Need to care about variable naming conflict
@@ -80,8 +78,7 @@ object ServiceMixinExample {
*
* Pros:
* - Service reference (e.g., printer, fortune) can be scoped inside the trait.
- * - No boilerplate code is required
- * Cons:
+ * - No boilerplate code is required Cons:
* - To reuse it in other traits, we still need to care about the naming conflict
*/
trait FortunePrinterEmbedded {
@@ -96,8 +93,7 @@ object ServiceMixinExample {
*
* Pros:
* - Close to the traditional OO programming style
- * - Can be used without DI framework
- * Cons:
+ * - Can be used without DI framework Cons:
* - To add/remove modules, we need to create another constructor or class.
* -> code duplication occurs
* - It's hard to enhance the class functionality
diff --git a/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/Fluentd.scala b/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/Fluentd.scala
index cc0d0ce27e..1899bf72a3 100644
--- a/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/Fluentd.scala
+++ b/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/Fluentd.scala
@@ -122,7 +122,8 @@ object Fluentd {
/**
* Create a new Fluency-backed FluentdClient.
- * @deprecated Use Fluentd.client.newFluentdLogger instead
+ * @deprecated
+ * Use Fluentd.client.newFluentdLogger instead
*/
def newFluentdLogger(
host: String = "127.0.0.1",
@@ -157,7 +158,8 @@ object Fluentd {
}
/**
- * @deprecated Use Fluentd.client.newTDLogger instead
+ * @deprecated
+ * Use Fluentd.client.newTDLogger instead
*/
def newTDLogger(
apikey: String,
diff --git a/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/package.scala b/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/package.scala
index 16a371265e..1853bb14d5 100644
--- a/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/package.scala
+++ b/airframe-fluentd/src/main/scala/wvlet/airframe/fluentd/package.scala
@@ -23,7 +23,8 @@ package object fluentd {
/**
* A MetricLogger design for sending metrics to Fluentd.
*
- * @deprecated Use Fluentd.client.newFluentdLogger instead
+ * @deprecated
+ * Use Fluentd.client.newFluentdLogger instead
*/
def withFluentdLogger(
host: String = "127.0.0.1",
@@ -65,7 +66,8 @@ package object fluentd {
/**
* A MetricLogger design for sending metrics to TD
*
- * @deprecated Use Fluentd.client.newTDLogger instead
+ * @deprecated
+ * Use Fluentd.client.newTDLogger instead
*/
def withTDLogger(
apikey: String,
diff --git a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/HttpClientIR.scala b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/HttpClientIR.scala
index 2e3ccb2e91..1ea1131d67 100644
--- a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/HttpClientIR.scala
+++ b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/HttpClientIR.scala
@@ -24,7 +24,8 @@ import wvlet.airframe.surface.{GenericSurface, HigherKindedTypeSurface, MethodPa
import wvlet.log.LogSupport
/**
- * Generate an intermediate representation (IR) of Scala HTTP client code from a given airframe-http interface definition (Router).
+ * Generate an intermediate representation (IR) of Scala HTTP client code from a given airframe-http interface
+ * definition (Router).
*
* This IR abstracts away the differences between Scala (Sync/Async clients) and Scala.js (Async + AJAX).
*/
diff --git a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/RouteAnalyzer.scala b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/RouteAnalyzer.scala
index 0c4f5b6bf1..3c04d855e0 100644
--- a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/RouteAnalyzer.scala
+++ b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/RouteAnalyzer.scala
@@ -36,8 +36,8 @@ object RouteAnalyzer {
}
/**
- * airframe-http interface may contain HTTP specific parameters (e.g., HttpRequest, HttpContext, etc.).
- * We need to remove these server-side only arguments to generate client methods.
+ * airframe-http interface may contain HTTP specific parameters (e.g., HttpRequest, HttpContext, etc.). We need to
+ * remove these server-side only arguments to generate client methods.
*/
private def isClientSideArg(x: MethodParameter): Boolean = {
!classOf[HttpMessage.Request].isAssignableFrom(x.surface.rawType) &&
@@ -54,9 +54,9 @@ object RouteAnalyzer {
var pathOnlyArgs = Set.empty[MethodParameter]
/**
- * Resolve path variables (e.g., id in /v1/query/:id) using the client interface arguments.
- * For example, if the input resource (e.g., QueryRequest(id:String)) contains parameters matching the path variables,
- * use them when building path strings.
+ * Resolve path variables (e.g., id in /v1/query/:id) using the client interface arguments. For example, if the
+ * input resource (e.g., QueryRequest(id:String)) contains parameters matching the path variables, use them when
+ * building path strings.
*/
val path = {
val pathBuilder = Seq.newBuilder[String]
diff --git a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/openapi/OpenAPI.scala b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/openapi/OpenAPI.scala
index 38c739b7d5..6f9d2b649b 100644
--- a/airframe-http-codegen/src/main/scala/wvlet/airframe/http/openapi/OpenAPI.scala
+++ b/airframe-http-codegen/src/main/scala/wvlet/airframe/http/openapi/OpenAPI.scala
@@ -57,7 +57,8 @@ object OpenAPI {
/**
* Generate Open API model class from Airframe HTTP/RPC Router definition
* @param router
- * @return OpenAPI model class
+ * @return
+ * OpenAPI model class
*/
def ofRouter(router: Router, config: OpenAPIGeneratorConfig = OpenAPIGeneratorConfig()): OpenAPI = {
OpenAPIGenerator.buildFromRouter(router, config)
diff --git a/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/FinagleServer.scala b/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/FinagleServer.scala
index cc4aef5a7a..0cd940b24b 100644
--- a/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/FinagleServer.scala
+++ b/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/FinagleServer.scala
@@ -159,8 +159,7 @@ case class FinagleServerConfig(
}
/**
- * Start the server and execute the code block. After finishing the code block,
- * it will stop the server.
+ * Start the server and execute the code block. After finishing the code block, it will stop the server.
*
* If you want to keep running the server, call server.waitServerTermination inside the code block.
*/
@@ -232,9 +231,9 @@ object FinagleServer extends LogSupport {
}
/**
- * The default error handler to return HttpServerException with its error code and content body (if defined).
- * For other types of errors, it wraps exceptions as InternalServerError (500).
- * For such unknown errors, we do not return the exception as is because it may contain internal information.
+ * The default error handler to return HttpServerException with its error code and content body (if defined). For
+ * other types of errors, it wraps exceptions as InternalServerError (500). For such unknown errors, we do not return
+ * the exception as is because it may contain internal information.
*/
def defaultErrorFilter: SimpleFilter[Request, Response] =
new SimpleFilter[Request, Response] {
@@ -300,7 +299,8 @@ trait FinagleServerFactory extends AutoCloseable with LogSupport {
/**
* Override this method to customize Finagle Server configuration.
- * @deprecated(description = "Use FinagleServerConfig.withServerInitializer", since = "19.11.0")
+ * @deprecated(description
+ * = "Use FinagleServerConfig.withServerInitializer", since = "19.11.0")
*/
protected def initServer(server: Http.Server): Http.Server = {
// Do nothing by default
diff --git a/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/package.scala b/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/package.scala
index d9bb55968f..a6653013f8 100644
--- a/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/package.scala
+++ b/airframe-http-finagle/src/main/scala/wvlet/airframe/http/finagle/package.scala
@@ -30,8 +30,7 @@ package object finagle {
type FinagleSyncClient = HttpSyncClient[Request, Response]
/**
- * A design for setting up airframe-http-finagle.
- * If you create your own FinagleServers, use this design.
+ * A design for setting up airframe-http-finagle. If you create your own FinagleServers, use this design.
*/
def finagleBaseDesign: Design =
Design.newDesign
diff --git a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcContext.scala b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcContext.scala
index ab4845393b..4d08301985 100644
--- a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcContext.scala
+++ b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcContext.scala
@@ -19,7 +19,8 @@ object GrpcContext {
private[grpc] val contextKey = Context.key[GrpcContext]("grpc_context")
/**
- * Get the current GrpcContext. If it returns None, it means this method is called outside gRPC's local thread for processing the request
+ * Get the current GrpcContext. If it returns None, it means this method is called outside gRPC's local thread for
+ * processing the request
*
* @return
*/
diff --git a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcServer.scala b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcServer.scala
index 6140a29c0a..ae5f856535 100644
--- a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcServer.scala
+++ b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/GrpcServer.scala
@@ -75,8 +75,8 @@ case class GrpcServerConfig(
this.copy(executorProvider = provider)
/**
- * Set the maximum number of grpc server threads. The default is max(the number of CPU x 2, 2).
- * If you are using a custom ExecutorService, this setting might not be effective.
+ * Set the maximum number of grpc server threads. The default is max(the number of CPU x 2, 2). If you are using a
+ * custom ExecutorService, this setting might not be effective.
*/
def withMaxThreads(numThreads: Int) = this.copy(maxThreads = numThreads)
@@ -96,8 +96,8 @@ case class GrpcServerConfig(
}
/**
- * Start a standalone gRPC server and execute the given code block.
- * After exiting the code block, it will stop the gRPC server.
+ * Start a standalone gRPC server and execute the given code block. After exiting the code block, it will stop the
+ * gRPC server.
*
* If you want to keep running the server inside the code block, call server.awaitTermination.
*/
diff --git a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/gRPC.scala b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/gRPC.scala
index 67e91c1708..bfb5a26ee3 100644
--- a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/gRPC.scala
+++ b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/gRPC.scala
@@ -16,8 +16,8 @@ package wvlet.airframe.http.grpc
/**
* The entrypoint to start creating gRPC servers.
*
- * We use gRPC object name (instead of Grpc) to avoid the conflict with io.grpc.Grpc.
- * Scala 2.13 often complains about such naming conflicts
+ * We use gRPC object name (instead of Grpc) to avoid the conflict with io.grpc.Grpc. Scala 2.13 often complains about
+ * such naming conflicts
*/
object gRPC {
def server: GrpcServerConfig = GrpcServerConfig()
diff --git a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/internal/GrpcRequestLogger.scala b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/internal/GrpcRequestLogger.scala
index 9c3d4a4348..005a2e736f 100644
--- a/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/internal/GrpcRequestLogger.scala
+++ b/airframe-http-grpc/src/main/scala/wvlet/airframe/http/grpc/internal/GrpcRequestLogger.scala
@@ -59,7 +59,7 @@ class DefaultGrpcRequestLogger(serverName: String, logWriter: HttpAccessLogWrite
object GrpcRequestLogger extends LogSupport {
- def newLogger(serverName: String) = new DefaultGrpcRequestLogger(serverName, HttpAccessLogWriter.default)
+ def newLogger(serverName: String) = new DefaultGrpcRequestLogger(serverName, HttpAccessLogWriter.default)
def newLogger(serverName: String, writer: HttpAccessLogWriter) = new DefaultGrpcRequestLogger(serverName, writer)
// Logger for discarding all logs
diff --git a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorder.scala b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorder.scala
index 17bd97aeb7..eef9b15fc8 100644
--- a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorder.scala
+++ b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorder.scala
@@ -80,9 +80,8 @@ case class HttpRecorderConfig(
}
/**
- * Creates a proxy server for recording and replaying HTTP responses.
- * This is useful for simulate the behavior of Web services, that
- * are usually too heavy to use in an restricted environment (e.g., CI servers)
+ * Creates a proxy server for recording and replaying HTTP responses. This is useful for simulate the behavior of Web
+ * services, that are usually too heavy to use in an restricted environment (e.g., CI servers)
*/
object HttpRecorder extends LogSupport {
def config: HttpRecorderConfig = HttpRecorderConfig()
@@ -110,8 +109,8 @@ object HttpRecorder extends LogSupport {
}
/**
- * Creates an HTTP proxy server that will return recorded responses. If no record is found, it will
- * actually send the request to the destination server and record the response.
+ * Creates an HTTP proxy server that will return recorded responses. If no record is found, it will actually send the
+ * request to the destination server and record the response.
*/
def createRecorderProxy(
recorderConfig: HttpRecorderConfig,
@@ -141,8 +140,8 @@ object HttpRecorder extends LogSupport {
}
/**
- * Creates an HTTP server that returns only recorded HTTP responses.
- * If no matching record is found, use the given fallback handler.
+ * Creates an HTTP server that returns only recorded HTTP responses. If no matching record is found, use the given
+ * fallback handler.
*/
def createServer(recorderConfig: HttpRecorderConfig): FinagleServer = {
val recorder = new HttpRecordStore(recorderConfig)
@@ -153,8 +152,8 @@ object HttpRecorder extends LogSupport {
}
/**
- * Create an in-memory programmable server, whose recorded response will be discarded after closing the server.
- * This is useful for debugging HTTP clients
+ * Create an in-memory programmable server, whose recorded response will be discarded after closing the server. This
+ * is useful for debugging HTTP clients
*/
def createInMemoryServer(recorderConfig: HttpRecorderConfig): HttpRecorderServer = {
val recorder = new HttpRecordStore(recorderConfig, inMemory = true)
diff --git a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorderServer.scala b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorderServer.scala
index ec3ed9ce61..2202f7b59d 100644
--- a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorderServer.scala
+++ b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRecorderServer.scala
@@ -80,8 +80,8 @@ object HttpRecorderServer {
}
/**
- * A request filter for replaying responses for known requests, and sending the
- * requests to the destination server for unknown requests.
+ * A request filter for replaying responses for known requests, and sending the requests to the destination server
+ * for unknown requests.
*/
def newRecordProxyService(recordStore: HttpRecordStore, destClient: Service[Request, Response]): FinagleService = {
new ReplayFilter(recordStore) andThen new RecordingFilter(recordStore) andThen destClient
diff --git a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRequestMatcher.scala b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRequestMatcher.scala
index c626c60c1b..6960cf6a56 100644
--- a/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRequestMatcher.scala
+++ b/airframe-http-recorder/src/main/scala/wvlet/airframe/http/recorder/HttpRequestMatcher.scala
@@ -19,8 +19,7 @@ import com.twitter.finagle.http.{MediaType, Request}
import wvlet.log.LogSupport
/**
- * Compute a hash key of the given HTTP request.
- * This value will be used for DB indexes
+ * Compute a hash key of the given HTTP request. This value will be used for DB indexes
*/
trait HttpRequestMatcher {
def computeHash(request: Request): Int
diff --git a/airframe-http-router/src/main/scala-2/wvlet/airframe/http/router/RouterMacros.scala b/airframe-http-router/src/main/scala-2/wvlet/airframe/http/router/RouterMacros.scala
index 9f3a9ad21e..2563efdd3f 100644
--- a/airframe-http-router/src/main/scala-2/wvlet/airframe/http/router/RouterMacros.scala
+++ b/airframe-http-router/src/main/scala-2/wvlet/airframe/http/router/RouterMacros.scala
@@ -19,8 +19,7 @@ import scala.language.experimental.macros
import scala.reflect.macros.{blackbox => sm}
/**
- * Macros for creating a trait factory (Session => A) so that we can register
- * the factory upon defining Route.of[A].
+ * Macros for creating a trait factory (Session => A) so that we can register the factory upon defining Route.of[A].
*
* So once you register a route for A, you don't need to call bind[A].toSingleton, etc.
*/
diff --git a/airframe-http-router/src/main/scala-3/wvlet/airframe/http/router/RouterBase.scala b/airframe-http-router/src/main/scala-3/wvlet/airframe/http/router/RouterBase.scala
index 0d43cff66b..ae0c13d806 100644
--- a/airframe-http-router/src/main/scala-3/wvlet/airframe/http/router/RouterBase.scala
+++ b/airframe-http-router/src/main/scala-3/wvlet/airframe/http/router/RouterBase.scala
@@ -16,9 +16,10 @@ package wvlet.airframe.http.router
import wvlet.airframe.http.Router
trait RouterBase {
+
/**
- * Add methods annotated with @Endpoint to the routing table
- */
- def add[Controller]: Router = ???
+ * Add methods annotated with @Endpoint to the routing table
+ */
+ def add[Controller]: Router = ???
def andThen[Controller]: Router = ???
}
diff --git a/airframe-http-router/src/main/scala/wvlet/airframe/http/Router.scala b/airframe-http-router/src/main/scala/wvlet/airframe/http/Router.scala
index 2ed5068be3..ddc964b59a 100644
--- a/airframe-http-router/src/main/scala/wvlet/airframe/http/Router.scala
+++ b/airframe-http-router/src/main/scala/wvlet/airframe/http/Router.scala
@@ -26,15 +26,13 @@ import scala.language.higherKinds
*
* Router can be nested
* - Router1 with Filter1
- * - Router2: endpoints e1, e2
- * - Router3: endpoints e3 with Filter2
+ * - Router2: endpoints e1, e2
+ * - Router3: endpoints e3 with Filter2
* - Router4: endpoints e4
*
* From this router definition, the backend HTTP server specific implementation will build a mapping table like this:
- * e1 -> Filter1 andThen process(e1)
- * e2 -> Filter1 andThen process(e2)
- * e3 -> Filter1 andThen Filter2 andThen process(e3)
- * e4 -> process(e4)
+ * e1 -> Filter1 andThen process(e1) e2 -> Filter1 andThen process(e2) e3 -> Filter1 andThen Filter2 andThen
+ * process(e3) e4 -> process(e4)
*/
case class Router(
surface: Option[Surface] = None,
diff --git a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/Automaton.scala b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/Automaton.scala
index 48e6a3705c..9cb3bb1c07 100644
--- a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/Automaton.scala
+++ b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/Automaton.scala
@@ -54,13 +54,13 @@ object Automaton {
}
/**
- * Converting NFA to DFA
+ * Converting NFA to DFA
*
- * NFA: (Node, Token) -> Seq[Node] (multiple next nodes can be found for a given token)
- * DFA: State = Seq[Node]
- * (State, Token) -> State (only a single state can be found for a given token)
+ * NFA: (Node, Token) -> Seq[Node] (multiple next nodes can be found for a given token) DFA: State = Seq[Node]
+ * (State, Token) -> State (only a single state can be found for a given token)
*
- * @param init initial node to start
+ * @param init
+ * initial node to start
*/
def toDFA(init: Node, defaultToken: Token): DFA[NodeSet, Token] = {
// This code is following a standard procedure for converting NFA into DFA:
diff --git a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/HttpEndpointExecutionContext.scala b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/HttpEndpointExecutionContext.scala
index 9f8864008d..c6e2296474 100644
--- a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/HttpEndpointExecutionContext.scala
+++ b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/HttpEndpointExecutionContext.scala
@@ -23,9 +23,9 @@ import scala.concurrent.ExecutionContext
import scala.language.higherKinds
/**
- * Create the terminal request handler for processing a method with @EndPoint annotation.
+ * Create the terminal request handler for processing a method with @EndPoint annotation.
*
- * This handler will call a controller method with the request parameters build from the method arguments.
+ * This handler will call a controller method with the request parameters build from the method arguments.
*/
class HttpEndpointExecutionContext[Req: HttpRequestAdapter, Resp, F[_]](
protected val backend: HttpBackend[Req, Resp, F],
diff --git a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/RouteMatcher.scala b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/RouteMatcher.scala
index 15f7f6581a..698e03d696 100644
--- a/airframe-http-router/src/main/scala/wvlet/airframe/http/router/RouteMatcher.scala
+++ b/airframe-http-router/src/main/scala/wvlet/airframe/http/router/RouteMatcher.scala
@@ -127,7 +127,8 @@ object RouteMatcher extends LogSupport {
}
/**
- * Define an operation when matching path component is found (e.g., binding path components to matching path variables)
+ * Define an operation when matching path component is found (e.g., binding path components to matching path
+ * variables)
*/
sealed trait PathMapping {
// Matched route
diff --git a/airframe-http/.js/src/main/scala/wvlet/airframe/http/js/JSHttpClient.scala b/airframe-http/.js/src/main/scala/wvlet/airframe/http/js/JSHttpClient.scala
index 89d0bc5c5a..f5432aaac8 100644
--- a/airframe-http/.js/src/main/scala/wvlet/airframe/http/js/JSHttpClient.scala
+++ b/airframe-http/.js/src/main/scala/wvlet/airframe/http/js/JSHttpClient.scala
@@ -102,8 +102,7 @@ case class JSHttpClientConfig(
}
/**
- * Converter Future[A] to Rx[A].
- * Use this method when you need to add a common error handler (e.g., with Rx.recover)
+ * Converter Future[A] to Rx[A]. Use this method when you need to add a common error handler (e.g., with Rx.recover)
*/
def withRxConverter(f: Future[_] => RxStream[_]): JSHttpClientConfig = {
this.copy(rxConverter = f)
diff --git a/airframe-http/src/main/scala-2/wvlet/airframe/http/HttpMessageBase.scala b/airframe-http/src/main/scala-2/wvlet/airframe/http/HttpMessageBase.scala
index ee40430408..8d53efd572 100644
--- a/airframe-http/src/main/scala-2/wvlet/airframe/http/HttpMessageBase.scala
+++ b/airframe-http/src/main/scala-2/wvlet/airframe/http/HttpMessageBase.scala
@@ -29,7 +29,8 @@ trait HttpMessageBase[Raw] {
def withContentOf[A](a: A): Raw = macro HttpMacros.toContentOf[A]
/**
- * Set the content body using a given object and codec factory. Encoding can be JSON or MsgPack based on Content-Type header.
+ * Set the content body using a given object and codec factory. Encoding can be JSON or MsgPack based on Content-Type
+ * header.
*/
def withContentOf[A](a: A, codecFactory: MessageCodecFactory): Raw = macro HttpMacros.toContentWithCodecFactory[A]
}
diff --git a/airframe-http/src/main/scala-3/wvlet/airframe/http/HttpMessageBase.scala b/airframe-http/src/main/scala-3/wvlet/airframe/http/HttpMessageBase.scala
index af4cf9bd50..c15be45534 100644
--- a/airframe-http/src/main/scala-3/wvlet/airframe/http/HttpMessageBase.scala
+++ b/airframe-http/src/main/scala-3/wvlet/airframe/http/HttpMessageBase.scala
@@ -16,18 +16,19 @@ package wvlet.airframe.http
import wvlet.airframe.codec.MessageCodecFactory
trait HttpMessageBase[Raw] {
- def withJsonOf[A](a: A): Raw = ???
- def withJsonOf[A](a: A, codecFactory: MessageCodecFactory): Raw = ???
- def withMsgPackOf[A](a: A): Raw = ???
+ def withJsonOf[A](a: A): Raw = ???
+ def withJsonOf[A](a: A, codecFactory: MessageCodecFactory): Raw = ???
+ def withMsgPackOf[A](a: A): Raw = ???
def withMsgPackOf[A](a: A, codecFactory: MessageCodecFactory): Raw = ???
/**
- * Set the content body using a given object. Encoding can be JSON or MsgPack based on Content-Type header.
- */
+ * Set the content body using a given object. Encoding can be JSON or MsgPack based on Content-Type header.
+ */
def withContentOf[A](a: A): Raw = ???
/**
- * Set the content body using a given object and codec factory. Encoding can be JSON or MsgPack based on Content-Type header.
- */
+ * Set the content body using a given object and codec factory. Encoding can be JSON or MsgPack based on Content-Type
+ * header.
+ */
def withContentOf[A](a: A, codecFactory: MessageCodecFactory): Raw = ???
}
diff --git a/airframe-http/src/main/scala/wvlet/airframe/http/Http.scala b/airframe-http/src/main/scala/wvlet/airframe/http/Http.scala
index 7777135339..48e673b445 100644
--- a/airframe-http/src/main/scala/wvlet/airframe/http/Http.scala
+++ b/airframe-http/src/main/scala/wvlet/airframe/http/Http.scala
@@ -105,15 +105,15 @@ object Http {
import scala.language.experimental.macros
/**
- * Create a new HttpServerException with a custom content-body in JSON or MsgPack format.
- * The content type will be determined by the Accept header in the request
+ * Create a new HttpServerException with a custom content-body in JSON or MsgPack format. The content type will be
+ * determined by the Accept header in the request
*/
def serverException[A](request: HttpRequest[_], status: HttpStatus, content: A): HttpServerException =
macro HttpMacros.newServerException[A]
/**
- * Create a new HttpServerException with a custom content-body in JSON or MsgPack format.
- * The content type will be determined by the Accept header in the request
+ * Create a new HttpServerException with a custom content-body in JSON or MsgPack format. The content type will be
+ * determined by the Accept header in the request
*/
def serverException[A](
request: HttpRequest[_],
diff --git a/airframe-http/src/main/scala/wvlet/airframe/http/HttpClient.scala b/airframe-http/src/main/scala/wvlet/airframe/http/HttpClient.scala
index ca00212aba..ce53b91c39 100644
--- a/airframe-http/src/main/scala/wvlet/airframe/http/HttpClient.scala
+++ b/airframe-http/src/main/scala/wvlet/airframe/http/HttpClient.scala
@@ -27,17 +27,21 @@ import scala.util.Try
/**
* Asynchronous HTTP Client interface
*
- * @tparam F An abstraction for Future type (e.g., Resolves the differences between Twitter Future, Scala Future, etc.)
+ * @tparam F
+ * An abstraction for Future type (e.g., Resolves the differences between Twitter Future, Scala Future, etc.)
* @tparam Req
* @tparam Resp
*/
trait HttpClient[F[_], Req, Resp] extends AutoCloseable {
/**
- * Send an HTTP request and get the response. It will throw an exception for non successful responses (after reaching the max retry limit)
+ * Send an HTTP request and get the response. It will throw an exception for non successful responses (after reaching
+ * the max retry limit)
*
- * @throws HttpClientMaxRetryException if max retry reaches
- * @throws HttpClientException for non-retryable error is happend
+ * @throws HttpClientMaxRetryException
+ * if max retry reaches
+ * @throws HttpClientException
+ * for non-retryable error is happend
*/
def send(req: Req, requestFilter: Req => Req = identity): F[Resp]
@@ -244,10 +248,13 @@ class HttpSyncClientAdapter[F[_], Req, Resp](asyncClient: HttpClient[F, Req, Res
protected def awaitF[A](f: F[A]): A = asyncClient.awaitF(f)
/**
- * Send an HTTP request and get the response. It will throw an exception for non successful responses (after reaching the max retry)
+ * Send an HTTP request and get the response. It will throw an exception for non successful responses (after reaching
+ * the max retry)
*
- * @throws HttpClientMaxRetryException if max retry reaches
- * @throws HttpClientException for non-retryable error is happend
+ * @throws HttpClientMaxRetryException
+ * if max retry reaches
+ * @throws HttpClientException
+ * for non-retryable error is happend
*/
override def send(req: Req, requestFilter: Req => Req = identity): Resp = awaitF(asyncClient.send(req, requestFilter))
diff --git a/airframe-http/src/main/scala/wvlet/airframe/http/HttpMessage.scala b/airframe-http/src/main/scala/wvlet/airframe/http/HttpMessage.scala
index bf55835ac1..9e867b7a67 100644
--- a/airframe-http/src/main/scala/wvlet/airframe/http/HttpMessage.scala
+++ b/airframe-http/src/main/scala/wvlet/airframe/http/HttpMessage.scala
@@ -92,9 +92,9 @@ trait HttpMessage[Raw] extends HttpMessageBase[Raw] {
}
// HTTP header setting utility methods
- def withAccept(acceptType: String): Raw = withHeader(HttpHeader.Accept, acceptType)
- def withAcceptMsgPack: Raw = withHeader(HttpHeader.Accept, HttpHeader.MediaType.ApplicationMsgPack)
- def withAllow(allow: String): Raw = withHeader(HttpHeader.Allow, allow)
+ def withAccept(acceptType: String): Raw = withHeader(HttpHeader.Accept, acceptType)
+ def withAcceptMsgPack: Raw = withHeader(HttpHeader.Accept, HttpHeader.MediaType.ApplicationMsgPack)
+ def withAllow(allow: String): Raw = withHeader(HttpHeader.Allow, allow)
def withAuthorization(authorization: String): Raw = withHeader(HttpHeader.Authorization, authorization)
def withCacheControl(cacheControl: String): Raw = withHeader(HttpHeader.CacheControl, cacheControl)
def withContentType(contentType: String): Raw = withHeader(HttpHeader.ContentType, contentType)
diff --git a/airframe-json/src/main/scala/wvlet/airframe/json/JSON.scala b/airframe-json/src/main/scala/wvlet/airframe/json/JSON.scala
index 308503ec97..7a7c4da5e0 100644
--- a/airframe-json/src/main/scala/wvlet/airframe/json/JSON.scala
+++ b/airframe-json/src/main/scala/wvlet/airframe/json/JSON.scala
@@ -194,8 +194,7 @@ object JSON extends LogSupport {
}
/**
- * This function can be used to properly quote Strings
- * for JSON output.
+ * This function can be used to properly quote Strings for JSON output.
*/
def quoteJSONString(s: String): String = {
s.map {
diff --git a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/HelpMessagePrinter.scala b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/HelpMessagePrinter.scala
index 6119688c80..84bd8d1be7 100644
--- a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/HelpMessagePrinter.scala
+++ b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/HelpMessagePrinter.scala
@@ -44,7 +44,7 @@ object HelpMessagePrinter extends LogSupport with AnsiColorPalette {
* Teh default help message printer in this format:
* {{{
* usage: (command name) (command arguments)
- * (description)
+ * (description)
*
* [global options]
* ...
diff --git a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/Launcher.scala b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/Launcher.scala
index 7d6946149e..a318c25c0a 100755
--- a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/Launcher.scala
+++ b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/Launcher.scala
@@ -163,7 +163,8 @@ case class Launcher private[launcher] (config: LauncherConfig, private[launcher]
/**
* Add a sub command module to the launcher
*
- * @param name sub command name
+ * @param name
+ * sub command name
* @param description
* @tparam M
* @return
@@ -202,7 +203,7 @@ case class LauncherInfo(name: String, description: String, usage: String, isDefa
* repeat:Int=1,
* @argument
* message:String = "hello") {
- * for(i <- 0 until repeat) println(message)
+ * for(i <- 0 until repeat) println(message)
* }
* }
*
diff --git a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/OptionParser.scala b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/OptionParser.scala
index 1305357c43..4428634c87 100755
--- a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/OptionParser.scala
+++ b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/OptionParser.scala
@@ -183,7 +183,8 @@ object OptionParser extends LogSupport {
/**
* CommandTrait-line argument parser
*
- * @author leo
+ * @author
+ * leo
*/
class OptionParser(val schema: OptionSchema) extends LogSupport {
def this(m: MethodSurface) = this(new MethodOptionSchema(m))
@@ -194,7 +195,8 @@ class OptionParser(val schema: OptionSchema) extends LogSupport {
* Parse the command-line arguments
*
* @param args
- * @return parse result
+ * @return
+ * parse result
*/
def parse(args: Array[String]): OptionParserResult = {
def findMatch[T](p: Regex, s: String): Option[Match] = p.findFirstMatchIn(s)
diff --git a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/StringTree.scala b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/StringTree.scala
index 0198427833..8106c6c2e5 100644
--- a/airframe-launcher/src/main/scala/wvlet/airframe/launcher/StringTree.scala
+++ b/airframe-launcher/src/main/scala/wvlet/airframe/launcher/StringTree.scala
@@ -18,19 +18,17 @@ import wvlet.log.LogSupport
import wvlet.airframe.surface.reflect.Path
/**
- * Holder of structured data consisting of named values. ValueHolder is immutable, so
- * the set operations in this class return another ValueHolder and never modify the original ValueHolder.
+ * Holder of structured data consisting of named values. ValueHolder is immutable, so the set operations in this class
+ * return another ValueHolder and never modify the original ValueHolder.
*
- *
*/
@@ -44,9 +42,11 @@ sealed trait StringTree {
/**
* Set a value at the specified path
*
- * @param path string representation of Path
+ * @param path
+ * string representation of Path
* @param value
- * @return updated value holder
+ * @return
+ * updated value holder
*/
def set(path: String, value: String): StringTree = setNode(Path(path), Leaf(value))
@@ -55,9 +55,12 @@ sealed trait StringTree {
/**
* Set a value at the specified path
*
- * @param path path
- * @param value String value to set
- * @return updated value holder
+ * @param path
+ * path
+ * @param value
+ * String value to set
+ * @return
+ * updated value holder
*/
def setNode(path: Path, node: StringTree): StringTree
@@ -65,7 +68,8 @@ sealed trait StringTree {
* Extract a part of the value holder under the path
*
* @param path
- * @return value holder under the path
+ * @return
+ * value holder under the path
*/
def get(path: String): StringTree = get(Path(path))
@@ -73,7 +77,8 @@ sealed trait StringTree {
* Extract a part of the value holder under the path
*
* @param path
- * @return value holder under the path
+ * @return
+ * value holder under the path
*/
def get(path: Path): StringTree
diff --git a/airframe-log/.jvm/src/main/scala/wvlet/log/AirframeLogManager.scala b/airframe-log/.jvm/src/main/scala/wvlet/log/AirframeLogManager.scala
index 6d969f5429..0b3335649e 100644
--- a/airframe-log/.jvm/src/main/scala/wvlet/log/AirframeLogManager.scala
+++ b/airframe-log/.jvm/src/main/scala/wvlet/log/AirframeLogManager.scala
@@ -24,8 +24,7 @@ object AirframeLogManager {
}
/**
- * Custom log manager to postpone the reset of loggers
- * This is based on the technique mentioned in:
+ * Custom log manager to postpone the reset of loggers This is based on the technique mentioned in:
* https://stackoverflow.com/questions/13825403/java-how-to-get-logger-to-work-in-shutdown-hook
*/
class AirframeLogManager extends LogManager {
diff --git a/airframe-log/.jvm/src/main/scala/wvlet/log/LogLevelScanner.scala b/airframe-log/.jvm/src/main/scala/wvlet/log/LogLevelScanner.scala
index ea20ac7a77..d04bb703be 100644
--- a/airframe-log/.jvm/src/main/scala/wvlet/log/LogLevelScanner.scala
+++ b/airframe-log/.jvm/src/main/scala/wvlet/log/LogLevelScanner.scala
@@ -32,7 +32,8 @@ object LogLevelScanner {
/**
* Set log levels using a given Properties file
*
- * @param file Properties file
+ * @param file
+ * Properties file
*/
def setLogLevels(file: File): Unit = {
val logLevels = new Properties()
@@ -85,9 +86,9 @@ object LogLevelScanner {
}
/**
- * Terminate the log-level scanner thread. The thread will remain in the system until
- * the next log scan schedule. This is for reusing the thread if scheduleLogLevelScan is called again in a short duration, and
- * reduce the overhead of creating a new thread.
+ * Terminate the log-level scanner thread. The thread will remain in the system until the next log scan schedule.
+ * This is for reusing the thread if scheduleLogLevelScan is called again in a short duration, and reduce the
+ * overhead of creating a new thread.
*/
def stopScheduledLogLevelScan: Unit = {
logLevelScanner.stop
@@ -96,7 +97,8 @@ object LogLevelScanner {
/**
* @param logLevelFileCandidates
* @param lastScannedMillis
- * @return updated last scanned millis
+ * @return
+ * updated last scanned millis
*/
private[log] def scan(logLevelFileCandidates: List[String], lastScannedMillis: Option[Long]): Option[Long] = {
@tailrec
diff --git a/airframe-log/.jvm/src/main/scala/wvlet/log/io/Resource.scala b/airframe-log/.jvm/src/main/scala/wvlet/log/io/Resource.scala
index d9be0d13e1..e8e306c629 100644
--- a/airframe-log/.jvm/src/main/scala/wvlet/log/io/Resource.scala
+++ b/airframe-log/.jvm/src/main/scala/wvlet/log/io/Resource.scala
@@ -39,16 +39,20 @@ trait ResourceReader {
/**
* Resource file manager.
*
- * @author leo
+ * @author
+ * leo
*/
object Resource {
/**
* Open a resource as a stream, then execute the code block using the stream
*
- * @param referenceClass context class to specify the package containing the resource file
- * @param resourceFileName file name
- * @param body code block
+ * @param referenceClass
+ * context class to specify the package containing the resource file
+ * @param resourceFileName
+ * file name
+ * @param body
+ * code block
* @tparam U
*/
def open[U](referenceClass: Class[_], resourceFileName: String)(body: BufferedInputStream => U): U = {
@@ -123,10 +127,11 @@ object Resource {
* Finds the java.net.URL of the resource
*
* @param packageName
- * the base package name to find the resource
+ * the base package name to find the resource
* @param resourceFileName
- * the resource file name relative to the package folder
- * @return the URL of the specified resource
+ * the resource file name relative to the package folder
+ * @return
+ * the URL of the specified resource
*/
def find(packageName: String, resourceFileName: String): Option[URL] = {
val resourcePath = resolveResourcePath(packageName, resourceFileName)
@@ -151,19 +156,19 @@ object Resource {
/**
* VirtualFile is a common interface to handle system files and file resources in JAR.
*
- * System file resources have an URL prefixed with "file:".
- * e.g., "file:/C:/Program Files/Software/classes/org/xerial/util/FileResource.java"
- * JAR file contents have an URL prefixed with "jar:file:
+ * System file resources have an URL prefixed with "file:". e.g., "file:/C:/Program
+ * Files/Software/classes/org/xerial/util/FileResource.java" JAR file contents have an URL prefixed with "jar:file:
* e.g., "jar:file:/C:/Program Files/Software/something.jar!/org/xerial/util/FileResource.java"
*
- * @author leo
+ * @author
+ * leo
*/
abstract trait VirtualFile {
/**
- * Gets the logical path of the file.
- * For example, if this VirtualFile' URL is "file:/somewhere/org/xerial/util/FileResource.java",
- * its logical name is org/xerial/util/FileResource.java, beginning from the root package.
+ * Gets the logical path of the file. For example, if this VirtualFile' URL is
+ * "file:/somewhere/org/xerial/util/FileResource.java", its logical name is org/xerial/util/FileResource.java,
+ * beginning from the root package.
*
* @return
*/
@@ -172,7 +177,8 @@ object Resource {
/**
* is directory?
*
- * @return true when the file is a directory, otherwise false
+ * @return
+ * true when the file is a directory, otherwise false
*/
def isDirectory: Boolean
@@ -187,7 +193,8 @@ object Resource {
/**
* A virtual file implementation for usual files
*
- * @author leo
+ * @author
+ * leo
*/
case class SystemFile(file: java.io.File, logicalPath: String) extends VirtualFile {
def url: URL = file.toURI.toURL
@@ -198,7 +205,8 @@ object Resource {
/**
* A virtual file implementation for file resources contained in a JAR file
*
- * @author leo
+ * @author
+ * leo
*/
case class FileInJar(resourceURL: URL, logicalPath: String, isDirectory: Boolean) extends VirtualFile {
if (resourceURL == null) {
@@ -242,14 +250,16 @@ object Resource {
}
/**
- * Create a list of all resources under the given resourceURL recursively. If the
- * resourceURL is a file, this method searches directories under the path. If the resource is contained
- * in a Jar file, it searches contents of the Jar file.
+ * Create a list of all resources under the given resourceURL recursively. If the resourceURL is a file, this method
+ * searches directories under the path. If the resource is contained in a Jar file, it searches contents of the Jar
+ * file.
*
* @param resourceURL
- * @param packageName package name under consideration
+ * @param packageName
+ * package name under consideration
* @param resourceFilter
- * @return the list of resources matching the given resource filter
+ * @return
+ * the list of resources matching the given resource filter
*/
private def listResources(
resourceURL: URL,
@@ -336,8 +346,10 @@ object Resource {
/**
* Find resource URLs that can be found from a given class loader and its ancestors
*
- * @param cl class loader
- * @param name resource name
+ * @param cl
+ * class loader
+ * @param name
+ * resource name
* @return
*/
def findResourceURLs(cl: ClassLoader, name: String): Seq[URL] = {
diff --git a/airframe-log/src/main/scala-2/wvlet/log/LogMacros.scala b/airframe-log/src/main/scala-2/wvlet/log/LogMacros.scala
index dc37afc035..10fba46b30 100644
--- a/airframe-log/src/main/scala-2/wvlet/log/LogMacros.scala
+++ b/airframe-log/src/main/scala-2/wvlet/log/LogMacros.scala
@@ -17,11 +17,11 @@ import scala.language.experimental.macros
import scala.reflect.macros.blackbox.Context
/**
- * Scala macros for generating log output code. This class inserts a code that checkes log level.
- * If the logging is enabled, it sends a log with the source code location where the logging method is called.
+ * Scala macros for generating log output code. This class inserts a code that checkes log level. If the logging is
+ * enabled, it sends a log with the source code location where the logging method is called.
*
- * The log message object will created only if the log level is enabled, so logger.trace(xxx) etc. can be
- * used without any overhead.
+ * The log message object will created only if the log level is enabled, so logger.trace(xxx) etc. can be used without
+ * any overhead.
*/
private[log] object LogMacros {
private class MacroHelper[C <: Context](val c: C) {
diff --git a/airframe-log/src/main/scala/wvlet/airframe/log/package.scala b/airframe-log/src/main/scala/wvlet/airframe/log/package.scala
index 1441c82d62..e62808518e 100644
--- a/airframe-log/src/main/scala/wvlet/airframe/log/package.scala
+++ b/airframe-log/src/main/scala/wvlet/airframe/log/package.scala
@@ -20,8 +20,7 @@ import wvlet.log.Logger
package object log {
/**
- * Initialize the logger to the default log level and
- * default handler
+ * Initialize the logger to the default log level and default handler
*/
def init: Unit = {
Logger.init
diff --git a/airframe-log/src/main/scala/wvlet/log/Logger.scala b/airframe-log/src/main/scala/wvlet/log/Logger.scala
index f96868e9d4..e6a4639a60 100644
--- a/airframe-log/src/main/scala/wvlet/log/Logger.scala
+++ b/airframe-log/src/main/scala/wvlet/log/Logger.scala
@@ -158,8 +158,7 @@ class Logger(
}
/**
- * Suppress warning messages (i.e., setting ERROR log level during the code block).
- * Useful for exception testing
+ * Suppress warning messages (i.e., setting ERROR log level during the code block). Useful for exception testing
*/
def suppressWarnings[U](f: => U): U = {
val prev = getLogLevel
diff --git a/airframe-log/src/main/scala/wvlet/log/io/StopWatch.scala b/airframe-log/src/main/scala/wvlet/log/io/StopWatch.scala
index 38f2498e45..a4ecaa5a7f 100644
--- a/airframe-log/src/main/scala/wvlet/log/io/StopWatch.scala
+++ b/airframe-log/src/main/scala/wvlet/log/io/StopWatch.scala
@@ -30,8 +30,8 @@ import scala.collection.mutable.LinkedHashMap
//--------------------------------------
/**
- * Timer trait measures the performance of code blocks.
- * Extend this trait and wrap the code to measure with `time(code_name){ ... }`:
+ * Timer trait measures the performance of code blocks. Extend this trait and wrap the code to measure with
+ * `time(code_name){ ... }`:
*
* {{{
* class A extends Timer {
@@ -41,7 +41,7 @@ import scala.collection.mutable.LinkedHashMap
* // code A
* }
* block("B") {
- * // code B
+ * // code B
* }
* }
* // report elapsed time of A, B and the total running time
@@ -59,34 +59,34 @@ import scala.collection.mutable.LinkedHashMap
*
* // Repeat 10 times the evaluation of the whole block
* val t = time("repetitive evaluation", repeat=10) {
- * // This part will be executed 1000 x 10 times
- * block("A", repeat=1000) {
- * // code A
- * }
+ * // This part will be executed 1000 x 10 times
+ * block("A", repeat=1000) {
+ * // code A
+ * }
*
- * // This part will be executed 1000 x 10 times
- * block("B", repeat=1000) {
- * // code B
- * }
+ * // This part will be executed 1000 x 10 times
+ * block("B", repeat=1000) {
+ * // code B
+ * }
* }
*
* println(t)
*
* // Which code is faster?
* if(t("A") <= t("B"))
- * println("A is faster")
+ * println("A is faster")
* else
- * println("B is faster")
+ * println("B is faster")
* }
* }}}
*
- * When measuring Scala (Java) code performances, you should take the average of execution times and reorder
- * the code block execution orders, because JVM has JIT compiler, which optimizes the code at runtime.
- * And also cache usage and the running state of the garbage core (GC) affects
- * the code performance. By repeating the executions of the entire or individual blocks with the `repeat` option,
- * you can avoid such pitfalls of benchmarking.
+ * When measuring Scala (Java) code performances, you should take the average of execution times and reorder the code
+ * block execution orders, because JVM has JIT compiler, which optimizes the code at runtime. And also cache usage and
+ * the running state of the garbage core (GC) affects the code performance. By repeating the executions of the entire
+ * or individual blocks with the `repeat` option, you can avoid such pitfalls of benchmarking.
*
- * @author leo
+ * @author
+ * leo
*/
trait Timer extends Serializable {
import scala.jdk.CollectionConverters._
@@ -117,7 +117,8 @@ trait Timer extends Serializable {
*
* @param blockName
* @param logLevel
- * @param repeat the number of repetitive execution
+ * @param repeat
+ * the number of repetitive execution
* @param f
* @tparam A
* @return
@@ -299,7 +300,8 @@ class StopWatch {
/**
* Gets the elapsed time since this instance is created in seconds.
*
- * @return the elapsed time in seconds.
+ * @return
+ * the elapsed time in seconds.
*/
def getElapsedTime: Double = {
if (state == State.RUNNING) {
@@ -312,8 +314,7 @@ class StopWatch {
}
/**
- * Reset the stop watch. The subsequent calls to
- * getElapsedTime or getIntervalTime will measure the time interval
+ * Reset the stop watch. The subsequent calls to getElapsedTime or getIntervalTime will measure the time interval
* beginning from this method call.
*/
def reset: Unit = {
@@ -324,7 +325,8 @@ class StopWatch {
/**
* Stop the timer
*
- * @return interval time since the last resume call
+ * @return
+ * interval time since the last resume call
*/
def stop: Double = {
if (state == State.STOPPED) {
diff --git a/airframe-metrics/src/main/scala/wvlet/airframe/metrics/DataSize.scala b/airframe-metrics/src/main/scala/wvlet/airframe/metrics/DataSize.scala
index cf68dfa381..2850409073 100644
--- a/airframe-metrics/src/main/scala/wvlet/airframe/metrics/DataSize.scala
+++ b/airframe-metrics/src/main/scala/wvlet/airframe/metrics/DataSize.scala
@@ -20,8 +20,8 @@ import scala.annotation.tailrec
import scala.util.{Failure, Success, Try}
/**
- * A human-readable data size representation.
- * This is a re-implementation of https://github.com/airlift/units/blob/master/src/main/java/io/airlift/units/DataSize.java for Scala.
+ * A human-readable data size representation. This is a re-implementation of
+ * https://github.com/airlift/units/blob/master/src/main/java/io/airlift/units/DataSize.java for Scala.
*/
case class DataSize(value: Double, unit: DataSizeUnit) extends Comparable[DataSize] {
require(!value.isInfinite, s"infinite size")
diff --git a/airframe-msgpack/.jvm/src/main/scala/wvlet/airframe/msgpack/impl/UnpackerImpl.scala b/airframe-msgpack/.jvm/src/main/scala/wvlet/airframe/msgpack/impl/UnpackerImpl.scala
index 86bb962fa7..c99f617b1a 100644
--- a/airframe-msgpack/.jvm/src/main/scala/wvlet/airframe/msgpack/impl/UnpackerImpl.scala
+++ b/airframe-msgpack/.jvm/src/main/scala/wvlet/airframe/msgpack/impl/UnpackerImpl.scala
@@ -23,8 +23,7 @@ import wvlet.airframe.msgpack.spi._
import scala.collection.immutable.ListMap
/**
- * A bridge implementation with msgpack-core MessageUnpacker.
- * TODO: Use pure-Scala impl
+ * A bridge implementation with msgpack-core MessageUnpacker. TODO: Use pure-Scala impl
*/
class UnpackerImpl(unpacker: MessageUnpacker) extends Unpacker {
override def close(): Unit = {
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Buffer.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Buffer.scala
index 236fdfb5b4..4267c0e2dc 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Buffer.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Buffer.scala
@@ -16,11 +16,11 @@ package wvlet.airframe.msgpack.spi
/**
* Buffer interface, which does not have any internal cursors unlike ByteBuffer of Java library.
*
- * - The read methods read the buffer data from the given position.
- * - The write methods write data to the specified position in the buffer and return the written byte length.
+ * - The read methods read the buffer data from the given position.
+ * - The write methods write data to the specified position in the buffer and return the written byte length.
*
- * If the buffer capacity is insufficient, these read/write methods throw an [[InsufficientBufferException]].
- * If this exception is thrown, the user code should feed more data, and then resume reading.
+ * If the buffer capacity is insufficient, these read/write methods throw an [[InsufficientBufferException]]. If this
+ * exception is thrown, the user code should feed more data, and then resume reading.
*/
trait Buffer {
def size: Int
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageException.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageException.scala
index 1ce61a4fa6..7160468658 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageException.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageException.scala
@@ -40,9 +40,8 @@ case class InsufficientBufferException(currentPosition: Long, expectedLength: Lo
)
/**
- * This error is thrown when the user tries to read an integer value
- * using a smaller types. For example, calling MessageUnpacker.unpackInt() for an integer value
- * that is larger than Integer.MAX_VALUE will cause this exception.
+ * This error is thrown when the user tries to read an integer value using a smaller types. For example, calling
+ * MessageUnpacker.unpackInt() for an integer value that is larger than Integer.MAX_VALUE will cause this exception.
*/
case class IntegerOverflowException(bigInteger: BigInteger)
extends MessageException(ErrorCode.INTEGER_OVERFLOW, s"Too large integer: ${bigInteger}") {
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageFormat.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageFormat.scala
index 1b4723bb34..920e903097 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageFormat.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageFormat.scala
@@ -77,7 +77,8 @@ object MessageFormat {
/**
* Returns a MessageFormat type of the specified byte value
*
- * @param code MessageFormat of the given byte
+ * @param code
+ * MessageFormat of the given byte
* @return
*/
def of(code: Byte): MessageFormat = formatTable(code & 0xff)
@@ -85,7 +86,8 @@ object MessageFormat {
/**
* Converting a byte value into MessageFormat. For faster performance, use {@link #valueOf}
*
- * @param b MessageFormat of the given byte
+ * @param b
+ * MessageFormat of the given byte
* @return
*/
private[spi] def toMessageFormat(b: Byte): MessageFormat = {
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSink.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSink.scala
index 0f6df871f1..0a61b22598 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSink.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSink.scala
@@ -18,65 +18,65 @@ import java.io.{Flushable, IOException}
/**
* Provides a buffered output stream that writes sequence of [[WriteBuffer]] instances.
*
- * A Sink implementation has total control of the buffer memory so that it can reuse buffer memory,
- * use buffer pools, or use memory-mapped files.
+ * A Sink implementation has total control of the buffer memory so that it can reuse buffer memory, use buffer pools,
+ * or use memory-mapped files.
*/
trait MessageSink extends AutoCloseable with Flushable {
/**
- * Allocates the next buffer for writing MessagePack data.
- *
- * This method returns an [[WriteBuffer]] instance that has specified size of capacity at least.
- *
- * When this method is called twice, the previously returned buffer is no longer used. This method may be called
- * twice without call of [[writeBuffer(int)]] in between. In this case, the buffer should be
- * discarded without flushing it to the output.
+ * Allocates the next buffer for writing MessagePack data.
This method returns an [[WriteBuffer]] instance that
+ * has specified size of capacity at least.
When this method is called twice, the previously returned buffer is
+ * no longer used. This method may be called twice without call of [[writeBuffer(int)]] in between. In this case, the
+ * buffer should be discarded without flushing it to the output.
*
- * @param minimumSize the minimum required buffer size to allocate
- * @return a Buffer instance with at least minimumSize bytes of capacity
+ * @param minimumSize
+ * the minimum required buffer size to allocate
+ * @return
+ * a Buffer instance with at least minimumSize bytes of capacity
* @throws IOException
*/
@throws[IOException]
def next(minimumSize: Int): WriteBuffer
/**
- * Writes the previously allocated buffer(s).
- *
- * This method should write the buffer previously returned from [[next(int)]] method until specified number of
- * bytes. Once the entire buffer contents is totally written to the sink, the buffer should not be used because
- * a BufferSink implementation might reuse the buffer.
- *
- * This method is not always called for each [[next(int)]] call. In this case, the buffer should be discarded
- * without flushing it to the output when the next [[next(int)]] is called.
+ * Writes the previously allocated buffer(s).
This method should write the buffer previously returned from
+ * [[next(int)]] method until specified number of bytes. Once the entire buffer contents is totally written to the
+ * sink, the buffer should not be used because a BufferSink implementation might reuse the buffer.
This method is
+ * not always called for each [[next(int)]] call. In this case, the buffer should be discarded without flushing it to
+ * the output when the next [[next(int)]] is called.
*
- * @param length the number of bytes to write
+ * @param length
+ * the number of bytes to write
* @throws IOException
*/
@throws[IOException]
def writeBuffer(length: Int): Unit
/**
- * Writes an external payload data.
- * This method should follow semantics of OutputStream.
+ * Writes an external payload data. This method should follow semantics of OutputStream.
*
- * @param buffer the data to write
- * @param offset the start offset in the data
- * @param length the number of bytes to write
+ * @param buffer
+ * the data to write
+ * @param offset
+ * the start offset in the data
+ * @param length
+ * the number of bytes to write
* @throws IOException
*/
@throws[IOException]
def write(buffer: Array[Byte], offset: Int, length: Int): Unit
/**
- * Writes an external payload data.
- *
- * Unlike [[write(byte[], int, int)]] method, the buffer is given - this BufferSink implementation
- * gets ownership of the buffer and may modify contents of the buffer. Contents of this buffer won't be modified
- * by the caller.
+ * Writes an external payload data.
Unlike [[write(byte[], int, int)]] method, the buffer is given - this
+ * BufferSink implementation gets ownership of the buffer and may modify contents of the buffer. Contents of this
+ * buffer won't be modified by the caller.
*
- * @param buffer the data to add
- * @param offset the start offset in the data
- * @param length the number of bytes to add
+ * @param buffer
+ * the data to add
+ * @param offset
+ * the start offset in the data
+ * @param length
+ * the number of bytes to add
* @throws IOException
*/
@throws[IOException]
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSource.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSource.scala
index 3e5e814c87..f9887fe829 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSource.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageSource.scala
@@ -18,26 +18,24 @@ package wvlet.airframe.msgpack.spi
trait MessageSource extends AutoCloseable {
/**
- * Returns a next buffer to read.
- *
- * This method should return a [[ReadBuffer]] instance that has data filled in. When this method is called twice,
- * the previously returned buffer is no longer used. Thus implementation of this method can safely discard it.
- * This is useful when it uses a memory pool.
+ * Returns a next buffer to read.
This method should return a [[ReadBuffer]] instance that has data filled in.
+ * When this method is called twice, the previously returned buffer is no longer used. Thus implementation of this
+ * method can safely discard it. This is useful when it uses a memory pool.
*
- * @return the next input [[ReadBuffer]], or return None if no more buffer is available.
- * @throws java.io.IOException when IO error occurred when reading the data
+ * @return
+ * the next input [[ReadBuffer]], or return None if no more buffer is available.
+ * @throws java.io.IOException
+ * when IO error occurred when reading the data
*/
def next: Option[ReadBuffer]
/**
- * Closes the input.
- *
- * When this method is called, the buffer previously returned from [[next]] method is no longer used.
- * Thus implementation of this method can safely discard it.
- *
- * If the input is already closed then invoking this method has no effect.
+ * Closes the input.
When this method is called, the buffer previously returned from [[next]] method is no longer
+ * used. Thus implementation of this method can safely discard it.
If the input is already closed then invoking
+ * this method has no effect.
*
- * @throws Exception when IO error occurred when closing the data source
+ * @throws Exception
+ * when IO error occurred when closing the data source
*/
override def close: Unit
}
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/OffsetUnpacker.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/OffsetUnpacker.scala
index 1af5f77a75..d6e625c351 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/OffsetUnpacker.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/OffsetUnpacker.scala
@@ -26,7 +26,8 @@ import scala.collection.immutable.ListMap
import scala.collection.mutable
/**
- * Read a message pack data from a given offset in the buffer. The last read byte length can be checked by calling [[ReadCursor.lastReadLength]] method.
+ * Read a message pack data from a given offset in the buffer. The last read byte length can be checked by calling
+ * [[ReadCursor.lastReadLength]] method.
*/
object OffsetUnpacker {
def peekNextFormat(cursor: ReadCursor): MessageFormat = {
@@ -642,13 +643,15 @@ object OffsetUnpacker {
}
/**
- * Read a payload of the given length from the given buffer[position], and write the result to the destination buffer.
+ * Read a payload of the given length from the given buffer[position], and write the result to the destination
+ * buffer.
*
* @param cursor
* @param length
* @param dest
* @param destIndex
- * @return A slice (shallow copy) of the destination buffer
+ * @return
+ * A slice (shallow copy) of the destination buffer
*/
def readPayload(cursor: ReadCursor, length: Int, dest: WriteBuffer, destIndex: Int): ReadBuffer = {
cursor.readBytes(length, dest, destIndex)
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Packer.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Packer.scala
index ee62f496a5..74444821d7 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Packer.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Packer.scala
@@ -35,8 +35,8 @@ trait Packer extends AutoCloseable {
def packTimestamp(v: Instant): this.type = packTimestamp(v.getEpochSecond, v.getNano)
/**
- * if nanoAdjustment == 0 and epochSeconds <= 2^32, it will encode the timestamp using Timestamp32.
- * Otherwise, an appropriate timestamp code is chosen automatically from one of timestamp32, timestamp64, and timestamp96.
+ * if nanoAdjustment == 0 and epochSeconds <= 2^32, it will encode the timestamp using Timestamp32. Otherwise, an
+ * appropriate timestamp code is chosen automatically from one of timestamp32, timestamp64, and timestamp96.
*/
def packTimestamp(epochSecond: Long, nanoAdjustment: Int = 0): this.type
def packArrayHeader(arraySize: Int): this.type
diff --git a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Unpacker.scala b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Unpacker.scala
index 9db108cd58..59febc375d 100644
--- a/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Unpacker.scala
+++ b/airframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/Unpacker.scala
@@ -30,13 +30,14 @@ trait Unpacker extends AutoCloseable {
def unpackNil: Unit
/**
- * Peeks a Nil byte and read it if the next byte is actually a Nil value,
- * then proceed the cursor 1 byte and return true.
+ * Peeks a Nil byte and read it if the next byte is actually a Nil value, then proceed the cursor 1 byte and return
+ * true.
*
* If the next byte is not Nil, it will return false and the cursor position will not be changed.
*
- * @return true if a nil value is read and the cursor is proceeded 1 bytes. false if the next value is not
- * Nil and the cursor position will not change.
+ * @return
+ * true if a nil value is read and the cursor is proceeded 1 bytes. false if the next value is not Nil and the
+ * cursor position will not change.
*/
def tryUnpackNil: Boolean
def unpackBoolean: Boolean
diff --git a/airframe-rx-html/.js/src/main/scala/wvlet/airframe/rx/html/DOMRenderer.scala b/airframe-rx-html/.js/src/main/scala/wvlet/airframe/rx/html/DOMRenderer.scala
index 3646957fe9..6665fdeeb4 100644
--- a/airframe-rx-html/.js/src/main/scala/wvlet/airframe/rx/html/DOMRenderer.scala
+++ b/airframe-rx-html/.js/src/main/scala/wvlet/airframe/rx/html/DOMRenderer.scala
@@ -22,8 +22,8 @@ import scala.util.Try
/**
* Convert HtmlNodes into DOM elements for Scala.js.
*
- * An important functionality of this renderer is composing Cancelable objects so that
- * resources allocated along with the rendered DOM objects will be properly discarded.
+ * An important functionality of this renderer is composing Cancelable objects so that resources allocated along with
+ * the rendered DOM objects will be properly discarded.
*
* Resources include event listeners, Rx subscribers, etc.
*/
diff --git a/airframe-rx-html/src/main/scala/wvlet/airframe/rx/html/Attrs.scala b/airframe-rx-html/src/main/scala/wvlet/airframe/rx/html/Attrs.scala
index 3730e8f398..c5f6f9a17e 100644
--- a/airframe-rx-html/src/main/scala/wvlet/airframe/rx/html/Attrs.scala
+++ b/airframe-rx-html/src/main/scala/wvlet/airframe/rx/html/Attrs.scala
@@ -16,12 +16,12 @@ package wvlet.airframe.rx.html
import scala.language.dynamics
/**
- * This code is borrowed from ScalaTags by Li Haoyi:
- * from https://github.com/lihaoyi/scalatags/blob/master/scalatags/src/scalatags/generic/Attrs.scala
+ * This code is borrowed from ScalaTags by Li Haoyi: from
+ * https://github.com/lihaoyi/scalatags/blob/master/scalatags/src/scalatags/generic/Attrs.scala
*/
/**
- * A trait for global attributes that are applicable to any HTML5 element. All traits that define Attrs should
- * derive from this trait since all groupings of attributes should include these global ones.
+ * A trait for global attributes that are applicable to any HTML5 element. All traits that define Attrs should derive
+ * from this trait since all groupings of attributes should include these global ones.
*/
trait GlobalAttrs {
@@ -31,11 +31,10 @@ trait GlobalAttrs {
lazy val accesskey = attr("accesskey")
/**
- * This attribute is a space-separated list of the classes of the element.
- * Classes allows CSS and Javascript to select and access specific elements
- * via the class selectors or functions like the DOM method
- * document.getElementsByClassName. You can use cls as an alias for this
- * attribute so you don't have to backtick-escape this attribute.
+ * This attribute is a space-separated list of the classes of the element. Classes allows CSS and Javascript to
+ * select and access specific elements via the class selectors or functions like the DOM method
+ * document.getElementsByClassName. You can use cls as an alias for this attribute so you don't have to
+ * backtick-escape this attribute.
*
* MDN
*/
@@ -53,23 +52,19 @@ trait GlobalAttrs {
) // Specifies a context menu for an element. The context menu appears when a user right-clicks on the element
/**
- * This class of attributes, called custom data attributes, allows proprietary
- * information to be exchanged between the HTML and its DOM representation that
- * may be used by scripts. All such custom data are available via the HTMLElement
- * interface of the element the attribute is set on. The HTMLElement.dataset
- * property gives access to them.
+ * This class of attributes, called custom data attributes, allows proprietary information to be exchanged between
+ * the HTML and its DOM representation that may be used by scripts. All such custom data are available via the
+ * HTMLElement interface of the element the attribute is set on. The HTMLElement.dataset property gives access to
+ * them.
*
- * The * may be replaced by any name following the production rule of xml names
- * with the following restrictions:
+ * The * may be replaced by any name following the production rule of xml names with the following restrictions:
*
- * the name must not start with xml, whatever case is used for these letters;
- * the name must not contain any semicolon (U+003A);
- * the name must not contain capital A to Z letters.
+ * the name must not start with xml, whatever case is used for these letters; the name must not contain any semicolon
+ * (U+003A); the name must not contain capital A to Z letters.
*
- * Note that the HTMLElement.dataset attribute is a StringMap and the name of the
- * custom data attribute data-test-value will be accessible via
- * HTMLElement.dataset.testValue as any dash (U+002D) is replaced by the capitalization
- * of the next letter (camelcase).
+ * Note that the HTMLElement.dataset attribute is a StringMap and the name of the custom data attribute
+ * data-test-value will be accessible via HTMLElement.dataset.testValue as any dash (U+002D) is replaced by the
+ * capitalization of the next letter (camelcase).
*
* MDN
*/
@@ -80,12 +75,12 @@ trait GlobalAttrs {
/**
* Specifies the text direction for the content in an element. The valid values are:
*
- * - `ltr` Default. Left-to-right text direction
+ * - `ltr` Default. Left-to-right text direction
*
- * - `rtl` Right-to-left text direction
+ * - `rtl` Right-to-left text direction
*
- * - `auto` Let the browser figure out the text direction, based on the content,
- * (only recommended if the text direction is unknown)
+ * - `auto` Let the browser figure out the text direction, based on the content, (only recommended if the text
+ * direction is unknown)
*/
lazy val dir = attr("dir")
@@ -100,75 +95,65 @@ trait GlobalAttrs {
lazy val dropzone = attr("dropzone")
/**
- * Specifies that an element is not yet, or is no longer, relevant and
- * consequently hidden from view of the user.
+ * Specifies that an element is not yet, or is no longer, relevant and consequently hidden from view of the user.
*/
lazy val hidden = attr("hidden").noValue
/**
- * This attribute defines a unique identifier (ID) which must be unique in
- * the whole document. Its purpose is to identify the element when linking
- * (using a fragment identifier), scripting, or styling (with CSS).
+ * This attribute defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to
+ * identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
*
* MDN
*/
lazy val id = attr("id")
/**
- * This attribute participates in defining the language of the element, the
- * language that non-editable elements are written in or the language that
- * editable elements should be written in. The tag contains one single entry
- * value in the format defines in the Tags for Identifying Languages (BCP47)
- * IETF document. If the tag content is the empty string the language is set
- * to unknown; if the tag content is not valid, regarding to BCP47, it is set
- * to invalid.
+ * This attribute participates in defining the language of the element, the language that non-editable elements are
+ * written in or the language that editable elements should be written in. The tag contains one single entry value in
+ * the format defines in the Tags for Identifying Languages (BCP47) IETF document. If the tag content is the empty
+ * string the language is set to unknown; if the tag content is not valid, regarding to BCP47, it is set to invalid.
*
* MDN
*/
lazy val lang = attr("lang")
/**
- * This enumerated attribute defines whether the element may be checked for
- * spelling errors.
+ * This enumerated attribute defines whether the element may be checked for spelling errors.
*
* MDN
*/
lazy val spellcheck = attr("spellcheck").noValue
/**
- * This attribute contains CSS styling declarations to be applied to the
- * element. Note that it is recommended for styles to be defined in a separate
- * file or files. This attribute and the style element have mainly the
- * purpose of allowing for quick styling, for example for testing purposes.
+ * This attribute contains CSS styling declarations to be applied to the element. Note that it is recommended for
+ * styles to be defined in a separate file or files. This attribute and the style element have mainly the purpose of
+ * allowing for quick styling, for example for testing purposes.
*
* MDN
*/
lazy val style = attr("style")
/**
- * This integer attribute indicates if the element can take input focus (is
- * focusable), if it should participate to sequential keyboard navigation, and
- * if so, at what position. It can takes several values:
+ * This integer attribute indicates if the element can take input focus (is focusable), if it should participate to
+ * sequential keyboard navigation, and if so, at what position. It can takes several values:
*
- * - a negative value means that the element should be focusable, but should
- * not be reachable via sequential keyboard navigation;
- * - 0 means that the element should be focusable and reachable via sequential
- * keyboard navigation, but its relative order is defined by the platform
- * convention;
- * - a positive value which means should be focusable and reachable via
- * sequential keyboard navigation; its relative order is defined by the value
- * of the attribute: the sequential follow the increasing number of the
- * tabindex. If several elements share the same tabindex, their relative order
- * follows their relative position in the document).
+ * - a negative value means that the element should be focusable, but should not be reachable via sequential
+ * keyboard navigation;
+ * - 0 means that the element should be focusable and reachable via sequential keyboard navigation, but its
+ * relative order is defined by the platform convention;
+ * - a positive value which means should be focusable and reachable via sequential keyboard navigation; its
+ * relative order is defined by the value of the attribute: the sequential follow the increasing number of the
+ * tabindex. If several elements share the same tabindex, their relative order follows their relative position in
+ * the document).
*
- * An element with a 0 value, an invalid value, or no tabindex value should be placed after elements with a positive tabindex in the sequential keyboard navigation order.
+ * An element with a 0 value, an invalid value, or no tabindex value should be placed after elements with a positive
+ * tabindex in the sequential keyboard navigation order.
*/
lazy val tabindex = attr("tabindex")
/**
- * This attribute contains a text representing advisory information related to
- * the element it belongs too. Such information can typically, but not
- * necessarily, be presented to the user as a tooltip.
+ * This attribute contains a text representing advisory information related to the element it belongs too. Such
+ * information can typically, but not necessarily, be presented to the user as a tooltip.
*
* MDN
*/
@@ -210,9 +195,8 @@ trait ClipboardEventAttrs {
}
/**
- * Media Events - triggered by media like videos, images and audio. These apply to
- * all HTML elements, but they are most common in media elements, like