Skip to content

Commit 8eb3013

Browse files
authored
[#5058] Upgrade the Netty, Vertx version. (#5063)
1 parent c8b77b3 commit 8eb3013

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

dependencies/default/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<mock-server.version>5.14.0</mock-server.version>
7979
<nacos-client.version>2.2.0</nacos-client.version>
8080
<netflix-commons.version>0.3.0</netflix-commons.version>
81-
<netty.version>4.1.127.Final</netty.version>
81+
<netty.version>4.1.130.Final</netty.version>
8282
<okhttp3.version>4.10.0</okhttp3.version>
8383
<prometheus.version>0.16.0</prometheus.version>
8484
<protobuf.version>3.21.12</protobuf.version>
@@ -98,7 +98,7 @@
9898
<spring-boot.version>2.7.18</spring-boot.version>
9999
<swagger.version>1.6.9</swagger.version>
100100
<swagger2markup.version>1.3.3</swagger2markup.version>
101-
<vertx.version>4.5.21</vertx.version>
101+
<vertx.version>4.5.23</vertx.version>
102102
<zipkin.version>2.24.0</zipkin.version>
103103
<zipkin-reporter.version>2.16.3</zipkin-reporter.version>
104104
<tomcat.version>9.0.108</tomcat.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)