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 compiler warnings #3344

Merged
merged 5 commits into from Jul 6, 2020
Merged

Fix compiler warnings #3344

merged 5 commits into from Jul 6, 2020

Conversation

ennru
Copy link
Member

@ennru ennru commented Jul 6, 2020

Most warnings were "Auto-application to () is deprecated."
Very few "procedure syntax is deprecated".

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR that is currently being validated by Jenkins labels Jul 6, 2020
@akka-ci
Copy link

akka-ci commented Jul 6, 2020

Test FAILed.

Pull request validation report

Failed Test Suites

Test result for 'akka-http-core / Pr-validation / ./ executeTests'

[info] ScalaTest
[info] Run completed in 3 minutes, 25 seconds.
[info] Total number of tests run: 1036
[info] Suites: completed 77, aborted 0  Scopes: pending 1
[info] Tests: succeeded 1033, failed 3, canceled 0, ignored 2, pending 54
[info] *** 3 TESTS FAILED ***
[error] Failed: Total 1036, Failed 3, Errors 0, Passed 1033, Ignored 2, Pending 54
[error] Failed tests:
[error] 	akka.http.javadsl.model.JavaApiSpec
[error] 	akka.http.impl.engine.client.NewConnectionPoolSpec

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR that is currently being validated by Jenkins labels Jul 6, 2020
@akka-ci
Copy link

akka-ci commented Jul 6, 2020

Test PASSed.

Copy link
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the 'randomBoundary', otherwise great to clean this up further 👍

@@ -106,31 +106,31 @@ class MarshallingSpec extends AnyFreeSpec with Matchers with BeforeAndAfterAll w
"multipartMarshaller should correctly marshal multipart content with" - {
"no parts" in {
marshal(Multipart.General(`multipart/mixed`)) shouldEqual HttpEntity(
contentType = (`multipart/mixed` withBoundary randomBoundary).toContentType,
contentType = (`multipart/mixed` withBoundary randomBoundary()).toContentType,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In MarshallingSpec, we override multipartBoundaryRandom to a fixed value, so randomBoundary actually returns a constant (which AFAICS this test relies on).

Wouldn't it be clearer to, instead of overriding multipartBoundaryRandom, just call randomBoundary once and use that value twice in the test?

@@ -43,7 +43,7 @@ class DebuggingDirectivesSpec extends RoutingSpec {
resetDebugMsg()
Get("/hello") ~> route ~> check {
response shouldEqual Ok
normalizedDebugMsg shouldEqual "1: HttpRequest(HttpMethod(GET),http://example.com/hello,List(),HttpEntity.Strict(none/none,0 bytes total),HttpProtocol(HTTP/1.1))\n"
normalizedDebugMsg() shouldEqual "1: HttpRequest(HttpMethod(GET),http://example.com/hello,List(),HttpEntity.Strict(none/none,0 bytes total),HttpProtocol(HTTP/1.1))\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't have parentheses in the first place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could say it needs parens since its return value depends on a var, but indeed debatable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch, then let's just leave it like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I looked into that and kept it. Changed it after @jrudolph's comment, and back now...

Copy link
Member

@jrudolph jrudolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM This is great! Thanks. I agree with @raboof's comment and there's also another file where going without parentheses would make more sense.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Jul 6, 2020
@akka-ci
Copy link

akka-ci commented Jul 6, 2020

Test PASSed.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Jul 6, 2020
@akka-ci
Copy link

akka-ci commented Jul 6, 2020

Test PASSed.

@ennru ennru added this to the 10.2.0 milestone Jul 6, 2020
@ennru ennru merged commit d971d23 into akka:master Jul 6, 2020
@ennru ennru deleted the fix-warnings branch July 6, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants