-
Notifications
You must be signed in to change notification settings - Fork 645
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
Less use of deprecated APIs in Java code #2413
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,11 +131,7 @@ lazy val csvBench = internalProject("csv-bench") | |
|
||
lazy val dynamodb = alpakkaProject("dynamodb", "aws.dynamodb", Dependencies.DynamoDB) | ||
|
||
lazy val elasticsearch = alpakkaProject( | ||
"elasticsearch", | ||
"elasticsearch", | ||
Dependencies.Elasticsearch | ||
) | ||
lazy val elasticsearch = alpakkaProject("elasticsearch", "elasticsearch", Dependencies.Elasticsearch) | ||
|
||
// The name 'file' is taken by `sbt.file`, hence 'files' | ||
lazy val files = alpakkaProject("file", "file", Dependencies.File) | ||
|
@@ -194,7 +190,8 @@ lazy val googleCloudPubSubGrpc = alpakkaProject( | |
"-P:silencer:pathFilters=akka-grpc/main", | ||
"-P:silencer:pathFilters=akka-grpc/test" | ||
), | ||
crossScalaVersions --= Seq(Dependencies.Scala211) // 2.11 is not supported since Akka gRPC 0.6 | ||
compile / javacOptions := (compile / javacOptions).value.filterNot(_ == "-Xlint:deprecation"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [minor] This effectively just sets There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, we might want to add more linting in Common. |
||
crossScalaVersions --= Seq(Dependencies.Scala211) | ||
).enablePlugins(AkkaGrpcPlugin) | ||
|
||
lazy val googleCloudStorage = | ||
|
@@ -203,12 +200,7 @@ lazy val googleCloudStorage = | |
Dependencies.GoogleStorage, | ||
crossScalaVersions -= Dependencies.Scala211) | ||
|
||
lazy val googleFcm = alpakkaProject( | ||
"google-fcm", | ||
"google.firebase.fcm", | ||
Dependencies.GoogleFcm, | ||
Test / fork := true | ||
) | ||
lazy val googleFcm = alpakkaProject("google-fcm", "google.firebase.fcm", Dependencies.GoogleFcm, Test / fork := true) | ||
|
||
lazy val hbase = alpakkaProject("hbase", "hbase", Dependencies.HBase, Test / fork := true) | ||
|
||
|
@@ -228,21 +220,15 @@ lazy val ironmq = alpakkaProject( | |
crossScalaVersions -= Dependencies.Scala211 // hseeberger/akka-http-json does not support Scala 2.11 anymore | ||
) | ||
|
||
lazy val jms = | ||
alpakkaProject("jms", "jms", Dependencies.Jms, fatalWarnings := false) | ||
lazy val jms = alpakkaProject("jms", "jms", Dependencies.Jms) | ||
|
||
lazy val jsonStreaming = alpakkaProject("json-streaming", "json.streaming", Dependencies.JsonStreaming) | ||
|
||
lazy val kinesis = alpakkaProject( | ||
"kinesis", | ||
"aws.kinesis", | ||
Dependencies.Kinesis | ||
) | ||
lazy val kinesis = alpakkaProject("kinesis", "aws.kinesis", Dependencies.Kinesis) | ||
|
||
lazy val kudu = alpakkaProject("kudu", "kudu", Dependencies.Kudu, fork in Test := false) | ||
|
||
lazy val mongodb = | ||
alpakkaProject("mongodb", "mongodb", Dependencies.MongoDb) | ||
lazy val mongodb = alpakkaProject("mongodb", "mongodb", Dependencies.MongoDb) | ||
|
||
lazy val mqtt = alpakkaProject("mqtt", "mqtt", Dependencies.Mqtt) | ||
|
||
|
@@ -262,48 +248,35 @@ lazy val reference = internalProject("reference", Dependencies.Reference) | |
|
||
lazy val s3 = alpakkaProject("s3", "aws.s3", Dependencies.S3) | ||
|
||
lazy val pravega = | ||
alpakkaProject("pravega", | ||
"pravega", | ||
Dependencies.Pravega, | ||
Test / fork := true, | ||
crossScalaVersions -= Dependencies.Scala211 // 2.11 SAM issue for java API. | ||
) | ||
lazy val pravega = alpakkaProject( | ||
"pravega", | ||
"pravega", | ||
Dependencies.Pravega, | ||
Test / fork := true, | ||
crossScalaVersions -= Dependencies.Scala211 // 2.11 SAM issue for java API. | ||
) | ||
|
||
lazy val springWeb = alpakkaProject("spring-web", "spring.web", Dependencies.SpringWeb) | ||
|
||
lazy val simpleCodecs = alpakkaProject("simple-codecs", "simplecodecs") | ||
|
||
lazy val slick = alpakkaProject("slick", "slick", Dependencies.Slick) | ||
|
||
lazy val eventbridge = | ||
alpakkaProject("aws-event-bridge", "aws.eventbridge", Dependencies.Eventbridge) | ||
lazy val eventbridge = alpakkaProject("aws-event-bridge", "aws.eventbridge", Dependencies.Eventbridge) | ||
|
||
lazy val sns = alpakkaProject( | ||
"sns", | ||
"aws.sns", | ||
Dependencies.Sns | ||
) | ||
lazy val sns = alpakkaProject("sns", "aws.sns", Dependencies.Sns) | ||
|
||
lazy val solr = alpakkaProject("solr", "solr", Dependencies.Solr) | ||
|
||
lazy val sqs = alpakkaProject( | ||
"sqs", | ||
"aws.sqs", | ||
Dependencies.Sqs | ||
) | ||
lazy val sqs = alpakkaProject("sqs", "aws.sqs", Dependencies.Sqs) | ||
|
||
lazy val sse = alpakkaProject("sse", "sse", Dependencies.Sse) | ||
|
||
lazy val text = alpakkaProject("text", "text") | ||
|
||
lazy val udp = alpakkaProject("udp", "udp") | ||
|
||
lazy val unixdomainsocket = alpakkaProject( | ||
"unix-domain-socket", | ||
"unixdomainsocket", | ||
Dependencies.UnixDomainSocket | ||
) | ||
lazy val unixdomainsocket = alpakkaProject("unix-domain-socket", "unixdomainsocket", Dependencies.UnixDomainSocket) | ||
|
||
lazy val xml = alpakkaProject("xml", "xml", Dependencies.Xml) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -539,7 +539,7 @@ class JmsConnectorsSpec extends JmsSpec { | |
val completionFuture: Future[Done] = Source(msgsIn).runWith(jmsSink) | ||
completionFuture.futureValue shouldBe Done | ||
// make sure connection was closed | ||
connectionFactory.cachedConnection shouldBe 'closed | ||
eventually { connectionFactory.cachedConnection shouldBe Symbol("closed") } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [minor] Don't like the symbol shorthand? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's deprecated in Scala 2.13. |
||
} | ||
|
||
"sink exceptional completion" in withConnectionFactory() { connFactory => | ||
|
@@ -557,7 +557,7 @@ class JmsConnectorsSpec extends JmsSpec { | |
|
||
completionFuture.failed.futureValue shouldBe a[RuntimeException] | ||
// make sure connection was closed | ||
eventually { connectionFactory.cachedConnection shouldBe 'closed } | ||
eventually { connectionFactory.cachedConnection shouldBe Symbol("closed") } | ||
} | ||
|
||
"producer disconnect exceptional completion" in withServer() { server => | ||
|
@@ -591,7 +591,7 @@ class JmsConnectorsSpec extends JmsSpec { | |
// - not yet initialized before broker stop, or | ||
// - closed on broker stop (if preStart came first). | ||
if (connectionFactory.cachedConnection != null) { | ||
connectionFactory.cachedConnection shouldBe 'closed | ||
connectionFactory.cachedConnection shouldBe Symbol("closed") | ||
} | ||
} | ||
|
||
|
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.
[question] Why hamcrest's
assertThat
?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.
The JUnit variant is deprecated nowadays.