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
Fix compiler warnings #3344
Conversation
Test FAILed. Pull request validation reportFailed Test SuitesTest result for 'akka-http-core / Pr-validation / ./ executeTests'
|
Test PASSed. |
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.
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, |
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.
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" |
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.
Shouldn't have parentheses in the first place.
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.
You could say it needs parens since its return value depends on a var
, but indeed debatable
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.
Ah, good catch, then let's just leave it like that.
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.
Yes, I looked into that and kept it. Changed it after @jrudolph's comment, and back now...
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.
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.
Test PASSed. |
Test PASSed. |
Most warnings were "Auto-application to
()
is deprecated."Very few "procedure syntax is deprecated".