Skip to content

Commit

Permalink
address some more publishing warnings/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Jul 20, 2024
1 parent b09a40b commit 86ac0c8
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object WebRTCConnector {
* Then create a channel directly on peer connection, which will trigger the connection initiation process.
* Somehow transfer the local session description to a remote peer, and [[updateRemoteDescription]] there.
* Accepting a remote description will update the local description,
* which then needs to be transferred back to the original peer and [[updateLocalDescription]] there should complete the connection.
* which then needs to be transferred back to the original peer and [[smartUpdateLocalDescription]] there should complete the connection.
*/
class WebRTCConnector(configuration: dom.RTCConfiguration) {

Expand Down Expand Up @@ -83,7 +83,7 @@ class WebRTCConnector(configuration: dom.RTCConfiguration) {
SessionDescription(peerConnection.localDescription).get
}

/** Use [[peerConnection.addIceCandidate]] to apply on remote.
/** Use `peerConnection.addIceCandidate` to apply on remote.
* Once an ICE candidate exists it is also automatically included in the local description, so this is not necessary.
*/
def iceCandidates: Async[Any, RTCIceCandidate] = Async.fromCallback:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dtn.routing

import dtn.{DtnPeer, Packet, Sender, WSEroutingClient}

import java.lang
import java.util.concurrent.ConcurrentHashMap
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
Expand All @@ -11,7 +12,8 @@ import scala.concurrent.Future
*/

class DirectRouter(ws: WSEroutingClient) extends BaseRouter(ws: WSEroutingClient) {
val delivered = ConcurrentHashMap.newKeySet[String]() // will grow indefinitely as we do not garbage collect here
val delivered: ConcurrentHashMap.KeySetView[String, lang.Boolean] =
ConcurrentHashMap.newKeySet[String]() // will grow indefinitely as we do not garbage collect here

override def onRequestSenderForBundle(packet: Packet.RequestSenderForBundle)
: Option[Packet.ResponseSenderForBundle] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ object X509Util {
*
* @param certificate
* The certificate to extract the subject identity from.
* @throws CertificateException
* @throws java.security.cert.CertificateException
* if the validation failed
*/
@throws[CertificateException]
Expand Down
2 changes: 1 addition & 1 deletion Modules/Lore/jvm/src/main/scala/lore/cli/Options.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.nio.file.Path

/** @param file Path to a file
* @param inline inline sourcecode of a program
* @param outputOptions output mode. Can be either [[ToFile]], [[SplitMode]] or [[StdOut]]
* @param outputOptions output mode. Can be either [[lore.cli.OutputOptions.ToFile]], [[lore.cli.OutputOptions.SplitMode]] or [[lore.cli.OutputOptions.StdOut]]
*/
case class Options(file: Option[Path] = None, inline: Option[String] = None, outputOptions: OutputOptions = StdOut) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package benchmarks.encrdt
import org.openjdk.jmh.results.RunResult
import org.openjdk.jmh.results.format.ResultFormatType
import org.openjdk.jmh.runner.Runner
import org.openjdk.jmh.runner.options.OptionsBuilder
import org.openjdk.jmh.runner.options.{Options, OptionsBuilder}

import java.nio.file.Paths
import java.util
Expand All @@ -14,7 +14,7 @@ object BenchmarkRunnerApp extends App {

val timeBefore = System.currentTimeMillis()

val jmhOptions = new OptionsBuilder()
val jmhOptions: Options = new OptionsBuilder()
.include("serializeOnly|encryptOnly")
.resultFormat(ResultFormatType.CSV)
.result("benchmarks/results/jmh_benchmark.csv")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import com.github.plokhotnyuk.jsoniter_scala.core.writeToArray
import rdts.syntax.DeltaAWLWWMContainer
import rdts.syntax.DeltaAWLWWMContainer.State
import rdts.time.VectorClock
import scala.language.implicitConversions

import scala.language.implicitConversions
import java.io.PrintWriter
import java.nio.file.{Files, Paths}
import java.nio.file.{Files, Path, Paths}
import scala.language.implicitConversions

object StateBasedUntrustedReplicaSizeBenchmark extends App {
Expand All @@ -18,7 +18,7 @@ object StateBasedUntrustedReplicaSizeBenchmark extends App {
val MAX_TESTED_ELEMENTS = Math.pow(10, maxElementExponent.toDouble).toInt
val MAX_PARALLEL_UPDATES = 4

val outDir = Paths.get("./benchmarks/results/")
val outDir: Path = Paths.get("./benchmarks/results/")
if !outDir.toFile.exists() then
outDir.toFile.mkdirs()
()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.google.crypto.tink.Aead
import rdts.syntax.DeltaAWLWWMContainer

import java.io.PrintWriter
import java.nio.file.{Files, Paths}
import java.nio.file.{Files, Path, Paths}
import java.util.UUID

object ToDoAppBenchmark extends App {
Expand Down Expand Up @@ -39,7 +39,7 @@ object ToDoAppBenchmark extends App {
clientReplica = new AlternativeInsecureToDoListClient("client", clientCrdt, intermediaryReplica)
}

val csvFileF =
val csvFileF: Path =
if USE_ENCRYPTION then Paths.get("./benchmarks/results/todoapp_benchmark.csv")
else Paths.get("./benchmarks/results/todoapp_benchmark trusted intermediary.csv")
Files.createDirectories(csvFileF.getParent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def api(using scheme: String = "http"): String =
val port = 3000
s"$scheme://$ip:$port"

val client = HttpClient.newBuilder()
val client: HttpClient = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(20))
.build()

Expand Down

0 comments on commit 86ac0c8

Please sign in to comment.