Skip to content

Commit

Permalink
Removed unused suppressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
morazow committed Dec 9, 2021
1 parent 6171b6e commit c6fe772
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class ExasolRDD(
conn
}

@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
override def getPartitions: Array[Partition] = {
mainConnection = createMainConnection()
mainStatement = mainConnection.createStatement()
Expand All @@ -95,7 +94,6 @@ class ExasolRDD(
}

// scalastyle:off null return
@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf", "org.wartremover.warts.Return"))
override def compute(split: Partition, context: TaskContext): Iterator[Row] = {
var closed = false
var resultSet: ResultSet = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ final case class ExasolConnectionManager(config: ExasolConfiguration) {
* @tparam T A result type of the `handle` function
* @return A result of `handle` function
*/
@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
def withStatement[T](handle: EXAStatement => T): T = withConnection[T] { conn =>
val stmt = conn.createStatement().asInstanceOf[EXAStatement]
ExasolConnectionManager.using(stmt)(handle)
Expand All @@ -141,7 +140,6 @@ final case class ExasolConnectionManager(config: ExasolConfiguration) {
* @tparam T A result type of the `handle` function
* @return A result of `handle` function
*/
@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
def withExecuteQuery[T](query: String)(handle: EXAResultSet => T): T = withStatement[T] { stmt =>
val rs = stmt.executeQuery(query).asInstanceOf[EXAResultSet]
ExasolConnectionManager.using(rs)(handle)
Expand Down Expand Up @@ -239,7 +237,6 @@ object ExasolConnectionManager extends Logging {
private[this] val connections: ConcurrentHashMap[String, EXAConnection] =
new ConcurrentHashMap()

@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
private[util] def createConnection(
url: String,
username: String,
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/com/exasol/spark/util/Filters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ object Filters {
// scalastyle:off null
// Suppression is accepted since we have terminal conditions in the
// recursion.
@SuppressWarnings(Array("org.wartremover.warts.Recursion"))
def filterToBooleanExpression(filter: Filter): Option[BooleanExpression] =
Option(filter match {
case EqualTo(attribute, value) =>
Expand Down
1 change: 0 additions & 1 deletion src/test/scala/com/exasol/spark/util/FiltersSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.exasol.sql.rendering.StringRendererConfig
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers

@SuppressWarnings(Array("org.wartremover.warts.Any"))
class FiltersSuite extends AnyFunSuite with Matchers {

private[this] def getWhereClause(filters: Seq[Filter]): String = {
Expand Down

0 comments on commit c6fe772

Please sign in to comment.