-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix getDecoder #502
fix getDecoder #502
Conversation
Thanks! |
private[sbt] object Base64 {
lazy val factory: () => Base64 = {
try {
new Java678Encoder().encode(Array[Byte]())
() =>
new Java678Encoder()
} catch {
case _: LinkageError =>
() =>
new Java89Encoder
}
}
} Does this mean we need Java 9 to test this? |
@eed3si9n Alternatively we can test the |
sbt 1.x requires Java 8, so that's no problem. |
The validator has checked the following projects against Scala 2.12,
✅ The result is: SUCCESS |
0b3717d
to
3c9b6ee
Compare
@eed3si9n I've add a test case but that seems making nosense, is that ok ? |
Would the test fail if you revert your fix? If so that's something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, trusting the obvious syntactic error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without the fix:
> zincPersist/testOnly sbt.inc.text.Base64Specification
[info] ! Base64.java89: Exception raised on property evaluation.
[info] > ARG_0: [B@18e5de43
[info] > Exception: java.lang.IllegalArgumentException: java.lang.ClassCastException@5433d119
[info] + Base64.java678: OK, passed 100 tests.
[info] ScalaCheck
[info] Failed: Total 2, Failed 0, Errors 1, Passed 1
[info] ScalaTest
[info] Run completed in 216 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
with the fix
> zincPersist/testOnly sbt.inc.text.Base64Specification
[info] + Base64.java678: OK, passed 100 tests.
[info] + Base64.java89: OK, passed 100 tests.
[info] ScalaCheck
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[info] ScalaTest
[info] Run completed in 217 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
No description provided.