Commit graph

57 commits

Author SHA1 Message Date
Patrik Nordwall
3e32cdc3ca fix ByteStringSpec for Scala 2.13, #26956
* simply ignore that compat test for 2.13 because the only reason for
  testing Java serialization compat is that in Akka 2.4 it used
  Java serialization (and in 2.5 when additional-serialization-bindings
  was disabled)
2019-05-20 12:07:27 +02:00
Christopher Batey
0ab7a96ae2
Remove Scala 2.11 for Akka 2.6 (#26760)
* Remove Scala 2.11 for Akka 2.6

* Remove unused import

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Update akka-actor/src/main/scala-2.13/akka/compat/Future.scala

Co-Authored-By: chbatey <christopher.batey@gmail.com>

* Remove last few bits of 2.11
2019-04-19 07:53:27 +01:00
Arnout Engelen
87354a6c9e Fix expected serialized bytes for 2.13 (#26766) 2019-04-17 15:54:28 +02:00
Christopher Batey
10e525062a Compiler warnings for actor-tests and remote-tests (#26685) 2019-04-15 08:54:16 +00:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
Arnout Engelen
0cc8e20a2e
Various scala-2.13.0-M5 fixes
Clearer imports in TcpDnsClient

Accept SVG's when checking if diagrams were generated

Fix akka-actor MiMa issues

akka-testkit scalafix changes

Update scalatest to 2.13-released snapshot

akka-stream scalafix changes

Update ssl-config

To version that's released with -M5

Take elements directly out of buffer

Manually fix immutable.Seq / Doc link

Make sure the right Concat, Sink is imported

akka-stream binary compat

akka-stream-testkit scalafix

akka-actor-tests scalafix

Eta-expensions
2019-01-11 11:44:35 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Doug Roper
b6d6d543a8 Optimize ByteString.grouped(size) (#25153)
* Add ByteString.grouped() benchmark & tests.

* Implement ByteString.grouped().

* PR comments.
2018-05-30 23:31:35 +09:00
Doug Roper
034f6c5c96 Remove unnecesary drop() from ByteString1.writeToBuffer(ByteBuffer) (#25151)
I found a strange call to `drop()` in `ByteString1.writeToBuffer(ByteBuffer)`. `drop()` instantiates a new `ByteString1` which is immediately discarded to GC. Appears unnecessary.

Removing it makes the `ByteString1` implementation match the one `ByteString1C`.
2018-05-29 20:13:07 +09:00
Doug Roper
8286ecffc5 Fix MultiByteArrayIterator.copyToArray silently drops bytes. #16303 (#25141)
I just got burned by #16303.

Answering https://github.com/akka/akka/issues/16303#issuecomment-62957914, it looks like `copyToArray[B >: Byte](Array[B])` can't call `getBytes(Array[Byte], Int, Int)` due to the type constraint (defined by `GenTraversableOnce`).

Instead, I'm going with the simple `isEmpty` solution proposed in the description of #16303 by @kpatrick-kixeye.
2018-05-24 16:11:50 +09:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Johan Andrén
7a0e5b31f8 Avoid Array.ofDim where possible #22516 2017-03-13 17:49:45 +01:00
Johan Andrén
28d96a2e59 Fix invalid ranges in ByteStringSpec #22389 2017-02-24 10:26:42 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
monkey-mas
c38d3850a2 =act improve ByteString#dropRight(...) (#21439)
#21439: =act improve ByteString#dropRight(...)
2016-12-06 15:51:11 +01:00
Johannes Rudolph
97bada7deb =act #21774 fix ByteString.toString to use fixed stringPrefix for all subclasses (#21775)
Otherwise, with 2.12,

ByteString().toString == "ByteString.ByteString1C()"

which would expose implementation details in the string representation.
This can lead to failing tests due to test expecting a particular string
representation of a ByteString which might be bad practice, yes, but is also
convenient.

The change is due to a fix in Scala for SI-9019 for which the string representation
of TraversableLike was changed which ByteString inherits.
See https://github.com/scala/scala/pull/5258/files
2016-11-17 15:51:36 +01:00
Johan Andrén
50370c69a3 ByteString.indexOf optimized to speed up framing stage #21530 2016-10-19 11:26:50 +02:00
monkey-mas
19dbe9a487 =act clean up ByteString#drop(...) (#21440)
* =act clean up ByteString#drop(...)

Current implementation has a good algorithm but seems a little bit complicated.

Clening-up does not suffer the performance (actually seems to have the better
performance when dropping(N-1)) where N is the length, and is easy to understand
almost the same algorithm now.

* Change private[akka] to priavte

* Rename go(...) and some variables

They should be easy for us to understand what they are.

* Add benchmark of ByteString#drop(...)
2016-10-05 09:25:34 -05:00
monkey-mas
f8f8828451 =act improve ByteString#take(...) (#21438)
Currently, we use ByteStringBuilder to create a new ByteString instance,
which would not be quite efficient.

Instead of doing this, we can do as follows so that we can achieve better performance:
1. Seek the index of _last_ vector element we need to _take_
2. Find the number of characters left to take from the _last_ ByteString1 element.
3. Create ByteString based on the information we obtained from 1 and 2

Then we just need to create a new Vector[ByteString1] at most twice, which should be
better than the current implementation, i.e., _append_ a new element every time we check
bytestrings(Vector[ByteString1]) element, which ends up O(N) _append_ execution where _N_ is
the length of bytestrings.
2016-09-21 20:40:54 -07:00
Konrad Malawski
fb45dd03f3 =act #21237 fix regression in ByteString.slice (#21294)
* =act #21237 fix regression in ByteString.slice

* Update ByteStringSpec.scala
2016-08-29 09:38:09 +01:00
Johan Andrén
d3df2e5ed3 =act ByteString deserialization unbroken for large bytestrings #20901 (#21096) 2016-08-03 16:20:59 +02:00
Johan Andrén
9dc474a10a Pre-fuse http server layer (#20990)
* Ported the first pre-fuse part endre did in pr #1972

* Allow the same HttpServerBluePrint to materialize multiple times

HttpRequestParser now behave like a proper GraphStage (with regards to materialization)
HttpResponseParser is kept "weird" to limit scope of commit.

* TestClient method to dump with http client and curl in parallel for comparison

* Cleanup

* tightening down what can be overriden
* tightening down access modifiers
* updates according to review

* Better defaults for the test server

* Ups. Don't listen to public interfaces in test server by default.
2016-07-22 14:07:41 +02:00
Konrad Malawski
fde9d86879 ByteString optimisations of methods in HTTP parsing hot-path (#20994)
* =act #20992 prepare benchmarks for ByteString optimisations

* =act #20992 optimise common ByteString operations: drop,take,slice...

* =act,htc #15965 add ByteString.decodeString(java.nio.charsets.Charset)
2016-07-20 14:01:51 +02:00
Konrad Malawski
d3ea9e49db =htp cache default RejectionHandler instance, it's safe to share (#20996) 2016-07-20 12:18:52 +02:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Johan Andrén
62e30b3c08 Update copyrights and links to the new company name #19851 2016-02-23 12:58:39 +01:00
Prayag Verma
b7783968a0 =pro #19068 All copyrights ranges and single years updated to a range ending in 2016 2016-01-25 10:20:30 +01:00
hepin
e0f06fdee7 +act #13516 add getByteString and getBytes method with a given length 2015-04-21 14:33:48 +08:00
Konrad Malawski
8ad51fba39 Merge pull request #17144 from colinrgodsey/15170-bytestringser-2
ByteString serialization
2015-04-08 11:44:03 +02:00
Colin Godsey
1984a76195 =act #15170 bytestring serialization 2015-04-07 09:34:21 -05:00
hepin
954a86bf80 -#15825 add isEmpty and nonEmpty to ByteStringBuilder 2015-03-28 13:39:46 +08:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Patrik Nordwall
0afe653fe1 =clu #3517 Guard against wrong random selection
* When all weights in the map are zero total became 0, which is not
  valid in random pick. Treat this special case as empty WeightedRoutees, i.e.
  no availble targets and routing to deadLetters.
2013-08-16 12:04:42 +02:00
Viktor Klang
6783bb2729 #3520 - fixing putLongParts in ByteStringBuilder and adding tests 2013-08-06 02:14:07 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Viktor Klang
950d19a377 #3153 - 'Fixing' the ByteStringSpec by not having it generate now illegal combinations of data for copyToArray 2013-03-14 20:10:03 +01:00
Viktor Klang
647c128aaa Making it easier to understand where the SerializeSpec fails 2013-01-28 23:08:17 +01:00
Viktor Klang
2f86107b10 #2913 - Adding asByteBuffers to ByteString 2013-01-28 14:42:53 +01:00
Roland
a15900a591 port onto SBT-0.12 branch 2012-08-22 11:10:36 +02:00
Oliver Schulz
b6b117cf54 Improved ByteString.{head,tail,last, init} and added missing tests 2012-06-17 22:18:51 +02:00
Oliver Schulz
2ed00f0936 Removed some superfluous braces. 2012-06-15 17:27:27 +09:00
Oliver Schulz
91ff7a29b9 Completed ByteString tests in ByteStringSpec 2012-06-12 15:03:07 +09:00
Oliver Schulz
e01e324c80 Extended ByteStringBuilder tests in ByteStringSpec 2012-06-12 15:01:16 +09:00
Oliver Schulz
f01d5c619e Completed ByteIterator tests in ByteStringSpec 2012-06-12 15:01:06 +09:00