Skip to content

Commit d4a3fb1

Browse files
authored
[#5058] Upgrade the Netty, Vertx version. (#5059)
1 parent c177fbc commit d4a3fb1

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

demo/docker-build-config/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<name>${project.artifactId}:${project.version}</name>
4343
<alias>${project.artifactId}</alias>
4444
<build>
45-
<from>openjdk:21</from>
45+
<from>openjdk:17.0.2</from>
4646
<ports>
4747
<port>7070</port>
4848
<port>8080</port>

dependencies/default/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<mock-server.version>5.14.0</mock-server.version>
7878
<nacos-client.version>2.2.0</nacos-client.version>
7979
<netflix-commons.version>0.3.0</netflix-commons.version>
80-
<netty.version>4.1.127.Final</netty.version>
80+
<netty.version>4.1.130.Final</netty.version>
8181
<okhttp3.version>4.10.0</okhttp3.version>
8282
<prometheus.version>0.16.0</prometheus.version>
8383
<protobuf.version>3.21.12</protobuf.version>
@@ -97,7 +97,7 @@
9797
<spring-boot.version>3.4.9</spring-boot.version>
9898
<swagger.version>1.6.9</swagger.version>
9999
<swagger2markup.version>1.3.3</swagger2markup.version>
100-
<vertx.version>4.5.21</vertx.version>
100+
<vertx.version>4.5.23</vertx.version>
101101
<zipkin.version>3.4.3</zipkin.version>
102102
<zipkin-reporter.version>3.4.0</zipkin-reporter.version>
103103
<jakarta.validation.version>3.0.2</jakarta.validation.version>

foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/BufferInputStream.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public byte readByte() {
4545

4646
@Override
4747
public int read() {
48+
int avail = available();
49+
if (avail <= 0) {
50+
return -1;
51+
}
4852
return byteBuf.readUnsignedByte();
4953
}
5054

foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/stream/TestBufferInputStream.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public void tearDown() throws Exception {
4949

5050
@Test
5151
public void testRead() {
52-
Assertions.assertEquals(0, instance.read());
52+
ByteBuf buffer = Unpooled.buffer();
53+
BufferInputStream bIn = new BufferInputStream(buffer);
54+
Assertions.assertEquals(-1, bIn.read());
5355
}
5456

5557
@Test

0 commit comments

Comments
 (0)