From f3ed8b404163d9b5eb138e46e7db77f94ebf9a7b Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Fri, 24 Nov 2023 16:05:04 +0800 Subject: [PATCH] style --- .../main/scala/org/apache/kyuubi/util/MathUtils.scala | 11 ++++++----- .../scala/org/apache/kyuubi/util/MathUtilsSuite.scala | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kyuubi-util-scala/src/main/scala/org/apache/kyuubi/util/MathUtils.scala b/kyuubi-util-scala/src/main/scala/org/apache/kyuubi/util/MathUtils.scala index 4f155872ecb..8cced292456 100644 --- a/kyuubi-util-scala/src/main/scala/org/apache/kyuubi/util/MathUtils.scala +++ b/kyuubi-util-scala/src/main/scala/org/apache/kyuubi/util/MathUtils.scala @@ -47,10 +47,11 @@ object MathUtils { case byteValue: Byte => byteValue >= 0 case shortValue: Short => shortValue >= 0 case charValue: Char => charValue >= 0 - case _ => try { - o.toString.toDouble >= 0.0d - } catch { - case _: Exception => false - } + case _ => + try { + o.toString.toDouble >= 0.0d + } catch { + case _: Exception => false + } } } diff --git a/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/MathUtilsSuite.scala b/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/MathUtilsSuite.scala index 042b7ff1aea..b04c2c92f72 100644 --- a/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/MathUtilsSuite.scala +++ b/kyuubi-util-scala/src/test/scala/org/apache/kyuubi/util/MathUtilsSuite.scala @@ -19,8 +19,9 @@ package org.apache.kyuubi.util // scalastyle:off -import org.apache.kyuubi.util.MathUtils.isNonNegativeNumber import org.scalatest.funsuite.AnyFunSuite + +import org.apache.kyuubi.util.MathUtils.isNonNegativeNumber // scalastyle:on // scalastyle:off