Skip to content
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 Seq implicit conversions warnings #11135

Merged
merged 1 commit into from Jan 31, 2022

Conversation

xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Jan 30, 2022

Pull Request Checklist

Helpful things

Fixes

Fix warnings

Purpose

use ArraySeq.unsafeWrapArray, toSeq or something

Background Context

https://app.travis-ci.com/github/playframework/playframework/jobs/557628971#L1164

[warn] /home/travis/build/playframework/playframework/transport/server/play-server/src/main/scala/play/core/server/ProdServerStart.scala:29:69: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]   def main(args: Array[String]): Unit = start(new RealServerProcess(args))
[warn]                                                                     ^
[warn] /home/travis/build/playframework/playframework/transport/server/play-server/src/main/scala/play/core/server/common/ServerResultUtils.scala:337:61: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]     cookieHeaderEncoding.SetCookieHeaderSeparatorRegex.split(value)
[warn]                                                             ^
[warn] /home/travis/build/playframework/playframework/persistence/play-jdbc-evolutions/src/main/scala/play/api/db/evolutions/Evolutions.scala:63:68: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]     sql.split("(?<!;);(?!;)").map(_.trim.replace(";;", ";")).filter(_ != "")
[warn]                                                                    ^

References

```
[warn] /home/travis/build/playframework/playframework/transport/server/play-server/src/main/scala/play/core/server/ProdServerStart.scala:29:69: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]   def main(args: Array[String]): Unit = start(new RealServerProcess(args))
[warn]                                                                     ^
[warn] /home/travis/build/playframework/playframework/transport/server/play-server/src/main/scala/play/core/server/common/ServerResultUtils.scala:337:61: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]     cookieHeaderEncoding.SetCookieHeaderSeparatorRegex.split(value)
[warn]                                                             ^
```

```
[warn] /home/travis/build/playframework/playframework/persistence/play-jdbc-evolutions/src/main/scala/play/api/db/evolutions/Evolutions.scala:63:68: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
[warn]     sql.split("(?<!;);(?!;)").map(_.trim.replace(";;", ";")).filter(_ != "")
[warn]                                                                    ^
```
@mkurz mkurz closed this Jan 30, 2022
@mkurz mkurz reopened this Jan 30, 2022
@mergify mergify bot merged commit 6c6480c into playframework:master Jan 31, 2022
@xuwei-k xuwei-k deleted the ArraySeq-unsafeWrapArray branch January 31, 2022 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants