Skip to content

Commit

Permalink
Fix warnings in scala sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
norrisjeremy committed Jan 22, 2023
1 parent 011d3c0 commit fa17b13
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,13 @@
<recompileMode>all</recompileMode>
<sendJavaToScalac>false</sendJavaToScalac>
<args>
<arg>-release</arg>
<arg>8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-Xfatal-warnings</arg>
<arg>-Xlint</arg>
<arg>-Werror</arg>
</args>
</configuration>
<executions>
Expand Down
16 changes: 7 additions & 9 deletions src/test/scala/DeflateInflateTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import matchers.should._
import JZlib._

class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers {
val comprLen = 40000
val uncomprLen = comprLen
var compr:Array[Byte] = _
var uncompr:Array[Byte] = _
private val comprLen = 40000
private val uncomprLen = comprLen
private var compr:Array[Byte] = _
private var uncompr:Array[Byte] = _

var deflater: Deflater = _
var inflater: Inflater = _
var err: Int = _
private var deflater: Deflater = _
private var inflater: Inflater = _
private var err: Int = _

before {
compr = new Array[Byte](comprLen)
Expand All @@ -33,8 +33,6 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers {
behavior of "Deflter and Inflater"

it can "deflate and infate data in the large buffer." in {
val data = "hello, hello!".getBytes

err = deflater.init(Z_BEST_SPEED)
err should equal (Z_OK)

Expand Down
2 changes: 0 additions & 2 deletions src/test/scala/DeflaterInflaterStreamTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import scala.language.reflectiveCalls

import java.io.{ByteArrayOutputStream => BAOS, ByteArrayInputStream => BAIS}

import JZlib._

class DeflaterInflaterStreamTest extends AnyFlatSpec with BeforeAndAfter with Matchers {

before {
Expand Down
14 changes: 7 additions & 7 deletions src/test/scala/WrapperTypeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import java.io.{ByteArrayOutputStream => BAOS, ByteArrayInputStream => BAIS}
import JZlib._

class WrapperTypeTest extends AnyFlatSpec with BeforeAndAfter with Matchers {
val data = "hello, hello!".getBytes
private val data = "hello, hello!".getBytes

val comprLen = 40000
val uncomprLen = comprLen
var compr:Array[Byte] = _
var uncompr:Array[Byte] = _
var err: Int = _
private val comprLen = 40000
private val uncomprLen = comprLen
private var compr:Array[Byte] = _
private var uncompr:Array[Byte] = _
private var err: Int = _

val cases = /* success */ /* fail */
private val cases = /* success */ /* fail */
List((W_ZLIB, (List(W_ZLIB, W_ANY), List(W_GZIP, W_NONE))),
(W_GZIP, (List(W_GZIP, W_ANY), List(W_ZLIB, W_NONE))),
(W_NONE, (List(W_NONE, W_ANY), List(W_ZLIB, W_GZIP))))
Expand Down

0 comments on commit fa17b13

Please sign in to comment.