-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scala 3 support for json streaming (#146)
* scala 3 support for json streaming Update JsonStreamReader.scala make buffer a val Update JsonStreamReader.scala Update JsonStreamReader.scala use Iterable.single Delete MyByteString.scala compile issue in scala 2.12 Update JsonStreamReader.scala * Update Dependencies.scala * use separate scala2/3 code * Update QueueHelper.scala
- Loading branch information
Showing
5 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...streaming/src/main/scala-2/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* license agreements; and to You under the Apache License, version 2.0: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This file is part of the Apache Pekko project, derived from Akka. | ||
*/ | ||
|
||
package org.apache.pekko.stream.connectors.json.impl | ||
|
||
import org.apache.pekko.util.ByteString | ||
|
||
import scala.collection.immutable.Queue | ||
|
||
private[impl] object QueueHelper { | ||
@inline final def enqueue(queue: Queue[ByteString], byteString: ByteString): Queue[ByteString] = | ||
queue.enqueue(byteString) | ||
} |
21 changes: 21 additions & 0 deletions
21
...streaming/src/main/scala-3/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* license agreements; and to You under the Apache License, version 2.0: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This file is part of the Apache Pekko project, derived from Akka. | ||
*/ | ||
|
||
package org.apache.pekko.stream.connectors.json.impl | ||
|
||
import org.apache.pekko.util.ByteString | ||
|
||
import scala.collection.immutable.Queue | ||
|
||
private[impl] object QueueHelper { | ||
inline final def enqueue(queue: Queue[ByteString], byteString: ByteString): Queue[ByteString] = { | ||
// see https://github.com/lampepfl/dotty/issues/17946 | ||
queue.enqueueAll(Iterable.single(byteString)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters