File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
samples/kotlin-mcp-server
commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,13 @@ tasks.test {
23
23
kotlin {
24
24
jvmToolchain(21 )
25
25
}
26
+
27
+ tasks.jar {
28
+ manifest {
29
+ attributes[" Main-Class" ] = " MainKt"
30
+ }
31
+
32
+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
33
+
34
+ from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
35
+ }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class ReadBuffer {
24
24
- 1L -> return null
25
25
0L -> {
26
26
buffer.skip(1 )
27
- " "
27
+ return null
28
28
}
29
29
30
30
else -> {
Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ class ReadBufferTest {
41
41
assertNull(readBuffer.readMessage())
42
42
}
43
43
44
+ @Test
45
+ fun `skip empty line` () {
46
+ val readBuffer = ReadBuffer ()
47
+ readBuffer.append(" \n " .toByteArray(StandardCharsets .UTF_8 ))
48
+ assertNull(readBuffer.readMessage())
49
+ }
50
+
44
51
@Test
45
52
fun `should be reusable after clearing` () {
46
53
val readBuffer = ReadBuffer ()
You can’t perform that action at this time.
0 commit comments