Skip to content

Conversation

@alex-dukhno
Copy link
Collaborator

No description provided.

@alex-dukhno alex-dukhno requested review from OlegDokuka and whyoleg May 1, 2020 17:36
@alex-dukhno alex-dukhno self-assigned this May 1, 2020
Copy link
Member

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

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

minor kotlin style related things

val payload: Payload?
) : Frame<SetupFlags>(FrameType.SETUP) {

constructor(
Copy link
Member

Choose a reason for hiding this comment

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

null can be used as default parameter in primary constructor

writeByte(dataMimeType.length.toInt())
writeUtf8(dataMimeType.text)
payload.metadata?.length?.let(this::writeLength)
if (metadataMimeType != null) {
Copy link
Member

Choose a reason for hiding this comment

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

As I remember mime types are required
so, need to write at least one byte with 0 value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@OlegDokuka I've not found if mime type is required or not in RSocket spec.
My question is should spec says explicitly is mime type required during connection establishment?

implementation("org.spekframework.spek2:spek-dsl-jvm:$spek_version")
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spek_version")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
testImplementation("io.cucumber:cucumber-java:5.6.0")
Copy link
Member

Choose a reason for hiding this comment

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

with kotlin, better to use cucumber-java8 with lambda syntax

}

class Server(private val port: Int) {
@Throws(Exception::class)
Copy link
Member

Choose a reason for hiding this comment

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

Throws annotation isn't needed, if you not use both kotlin and java in one project

private val initializer = ServerChannelInitializer()
private lateinit var server: Server
private lateinit var expected: SetupFrame
private lateinit var actual: SetupFrame
Copy link
Member

Choose a reason for hiding this comment

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

actual not assigned?

@alex-dukhno alex-dukhno force-pushed the setup-connection-simplest-spec branch from 2a1fa2f to 022e187 Compare May 2, 2020 10:25
@alex-dukhno alex-dukhno requested a review from whyoleg May 2, 2020 12:31
@alex-dukhno alex-dukhno force-pushed the setup-connection-simplest-spec branch from 8bea67f to fc06ba3 Compare May 9, 2020 11:13
@alex-dukhno alex-dukhno force-pushed the setup-connection-simplest-spec branch 2 times, most recently from 259fb1b to 6be3530 Compare May 17, 2020 12:51
@OlegDokuka OlegDokuka marked this pull request as ready for review May 17, 2020 12:51
@alex-dukhno alex-dukhno force-pushed the setup-connection-simplest-spec branch from 6be3530 to 08a599a Compare May 17, 2020 12:54
Copy link
Member

@OlegDokuka OlegDokuka left a comment

Choose a reason for hiding this comment

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

LGTM

@OlegDokuka OlegDokuka merged commit ea932e6 into rsocket:develop Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants